DSPTXTCNT DISPLAY TEXT COUNT TAASRFK |
The Display Text Count command is designed for an analysis of TXT
type members in a source file, but may be used on any source type.
One, generic, or all members in a source file may be analyzed. Total
records and blank records are always counted. Up to 5 comparison
groups (such as all the ABC values in a From/To location within a
source record) may also be compared for an equal value or scanned for
a value.
A typical command would be:
DSPTXTCNT SRCFILE(QTXTSRC)
All members in the file would be listed along with a count of the
total records in each member and the number of blank records.
To determine the number of times that the value 'ABC' is used in
positions 12-14, prompt for the command and fill in the CMPGRP prompt
as:
Compare group:
Title 'ABC Used'
From position 12
To position 14
Operation *EQ
Fold to upper *NO
This would result in the command to be executed as:
DSPTXTCNT SRCFILE(QTXTSRC)
CMPGRP(('ABC Used' 12 14 ABC *EQ *NO))
Each member would be read and a count of the records, all blank
records, and the records with 'ABC' in positions 12-14 would be
listed. The 'ABC Used' title would be right adjusted over the count
values.
You may also scan the entire source record for an 'ABC' value using
the *CT (contains) operation such as:
DSPTXTCNT SRCFILE(QTXTSRC)
CMPGRP(('ABC Used' 1 80 ABC *CT *NO))
Up to 5 compare groups may be described.
DSPTXTCNT escape messages you can monitor for
---------------------------------------------
TAA9891 No members exist in the file
TAA9892 The named member does not exist
TAA9893 No generic members exist
Escape messages from based on functions will be re-sent.
DSPTXTCNT Command parameters *CMD
----------------------------
SRCFILE The qualified name of the source file. The library
value defaults to *LIBL. A specific library or
*CURLIB may also be used.
MBR The member to be analyzed. *ALL for all members is
the default. A specific member or a generic name
may also be entered.
SRCTYP The source type or types to be analyzed. TXT is the
default. Up to 10 values may be entered such as CLP
or RPG. If a text member does not have the
specified value, it is bypassed. *ALL may be
specified for all source types.
CMPGRP Up to 5 compare groups may be entered. Each group
is made up of the following:
Title. Up to 10 characters may be entered as a
title for the count. The title cannot be blank if
any of the other parts of the group are entered.
The title will be right adjusted over the count.
From position. The From position in the data
portion of the source record. This excludes the
beginning 12 bytes of the source record (sequence
number and date). The number must be between 1 and
228.
To position. The To position in the data portion of
the source record. This excludes the beginning 12
bytes of the source record (sequence number and
date). The number must be between 1 and 228 and
cannot exceed the record length (minus the 12 bytes)
of the source file.
Value. Up to 20 bytes that can be compared or
scanned for. The value must be non-blank. *BLANK
should be entered to compare for blanks. For an *EQ
operation, the length of the value must be the same
length as described by the From/To positions
(excluding any trailing blanks). The data entered
will be folded to upper case unless surrounded by
apostrophes. If the source data to be compared may
be in mixed case, specify *YES for 'Fold source to
upper case'.
Operation. How to compare the value. *EQ or *NE
may be entered for a simple comparison. The length
described for the From/To positions must match the
length of the value (excluding any trailing blanks).
*CT may be entered to scan the data between the From
and To positions for the length of the value
(excluding any trailing blanks). The entire data of
a source record may be scanned. If *CT is used,
*BLANK may not be used as the value to be scanned
for.
Fold source to upper case. A *YES/*NO value to fold
the data to upper case before comparing or scanning.
*NO is the default. *YES should be specified if you
are searching for a value that may be in mixed case.
OUTPUT How to output the results. * is the default to
display the spooled file if the command is entered
interactively. The spooled file is deleted after it
is displayed if DSPSPLF is ended with F3/F12 or the
Enter key. To retain the spooled file, you may use
the the System Request 'Cancel' function and the
spooled file will exist in a HLD status.
If the command is entered in batch or *PRINT is
specified, the spooled file is output and retained.
Restrictions
------------
None.
Prerequisites
-------------
The following TAA Tools must be on your system:
ADJVAR Adjust variable
CHKGENERC Check generic
CHKOBJ3 Check object 3
EDTVAR Edit variable
EXTLST Extract list
EXTLST2 Extract list 2
HLRMVMSG HLL Remove message
RSNLSTMSG Resend last message
RTVDBFA Retrieve data base file attributes
RTVMBRLST Retrieve member list
RTVSYSVAL3 Retrieve system value 3
RTVVALA Retrieve value attributes
SNDCOMPMSG Send completion message
SNDESCINF Send escape information
SNDESCMSG Send escape message
SNDSTSCNT Send status count
SNDSTSMSG Send status message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
DSPTXTCNT *CMD TAASRFK QATTCMD
TAASRFKC *PGM CLP TAASRFKC QATTCL
TAASRFKR *PGM RPG TAASRFKR QATTRPG
|
Added to TAA Productivity tools October 15, 2011