The Scan Source Type command scans all the source files in a library
(or libraries) of a specified type (or types) for a string (or
strings). The command can be helpful when you want to scan for the
existence of some string of data and you are not sure where the data
may exist.
Because the command must find the source files and may scan many
source members, the command should be submitted to batch in a typical
situation.
A typical command would be:
SBMJOB JOB(SCAN) CMD(SCNSRCTYP LIB(*ALLUSR2) +
SRCTYP(*CLP) ARGUMENT(ABCDE))
The command would be submitted to batch. All source files in all
normal user libraries would be found. The CLP type members in each
source file would be scanned for the string ABCDE.
A spooled file would be output for each member containing the string
describing the statement number and the statement. A summary spooled
file named SUMSRC would be output with one line per member where the
string was found and a summary of the files and members scanned.
If the special values *ALL, *ALLUSR2, or *ALLNONQ are used, the user
must have *USE authority to the TAACVTLIBD authorization list.
When scanning all source files on the system, certain libraries may
be omitted by use of the OMITLIBS parameter.
The CVTLIBDBF TAA command is used to access the source files in the
designated libraries. The RTVMBRLST2 TAA command is used to access
the list of members in each file. The SCNSRC TAA command is used to
scan the members that match the specified source type(s).
Command parameters *CMD
------------------
LIB The library (or libraries) containing the source
files to be scanned. A specific library may be
named, a list of up to 40 libraries, or the special
values *USRLIBL (user library list including the
current library), *ALL (all libraries on the
system), *ALLUSR2 (normal user libraries), or
*ALLNONQ (libraries that do not begin with the
letter Q).
If you want to scan all of user source, the typical
entry would be *ALLUSR2. This includes all
libraries that do not begin with the letter Q plus
the QGPL library and excludes the S/36 libraries
#LIBRARY, #CGULIB, #COBLIB, #DFULIB, #RPGLIB,
#SDALIB, #SEULIB, and #DSULIB.
SRCTYP A list of up to 40 source types or the special value
*ALL. Only those source types specified will be
scanned. For a complete list of the supported
source types, use the command prompter function.
ARGUMENT Up to 20 bytes to use in the scan and up to 20
arguments. This is the string that will be scanned
for. You may need to surround the value in quotes
and enter in upper case depending on the value. For
typical field names (e.g. ACCRCV), the value may be
entered in lower case without quotes. Trailing
blanks will be trimmed off.
TRANSLATE A *YES/*NO option that defaults to *NO. *YES causes
the source statement to be translated to upper case
before scanning for the argument. This is useful if
you have both upper and lower case versions that
should be found or you are not sure of the case in
the statement.
SELCOL6 Whether to select only certain source records based
on the value of column 6 of the source data portion
of the record. The default is *ANY meaning that
column 6 is not considered and the entire data
portion of the record is scanned.
This option is designed for RPG/RPGLE and to allow
selection of the type of specification such as I, D,
C, etc. For example, if C is entered, only
statements with a C in column 6 of the source data
will be scanned. Note that this may include some
array and table data.
A value should only be entered when you are limiting
the scan to RPG/RPGLE source types. The scan which
occurs is not sensitive to the source type and would
probably provide misleading information if a non-RPG
type of source was scanned.
PRTFOLSTM A *YES/*NO option that defaults to *NO. *YES means
that if a hit is found on a statement, the next
statement will be printed whether it has a hit or
not.
The purpose of the *YES option is for a situation
such as when you are scanning for a command name and
want to determine whether a keyword has been used.
If the command is continued to a second source
statement, the keyword you may want to look for
could be on the second line. After the spooled file
is output, you can use DSPSPLF to scan for the
keyword.
OMITLIBS A list of up to 40 libraries to be omitted if *ALL,
*ALLNONQ, or *ALLUSR2 are specified for LIB.
OMITLIBS(*NONE) must be specified if a specific
library or libraries are named for the LIB
parameter.
Restrictions
------------
If a special value for the LIB parameter is used, the user must have
*USE authority to the TAACVTLIBD authorization list.
Prerequisites
-------------
The following TAA Tools must be on your system:
BLDPRTLIN Build print line
CVTLIBDBF Convert library data base files
EDTVAR Edit variable
EXPVAL Expand value
EXTLST Extract list
EXTLST2 Extract list 2
PRINT Print a spooled file
RTVMBRLST2 Retrieve member list 2
SCNSRC Scan source
SNDCOMPMSG Send completion message
SNDESCMSG Send escape message
SNDSTSMSG Send status message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
SCNSRCTYP *CMD TAASRDP QATTCMD
TAASRDPC *PGM CLP TAASRDPC QATTCL
|