The Check User Command checks for user commands in a source file or
all source files in a library or all libraries. Both TAA and user
commands are identified. The command is helpful for determining what
usage is being made of user and/or TAA commands. See also the
Determining TAA Tool usage option on HELPTAA.
A typical command would be:
CHKUSRCMD SRCFILE(LIBA/*ALL)
All source files in LIBA would be checked. Only members of a CL type
(such as CLP, CL, CLP38, CLLE) are checked. Non-CL source types are
bypassed.
If a member is a CL type, the source is checked to determine if it
has any commands which are not in QSYS. This includes TAA commands
and user written commands. See the later discussion concerning
commands in QSYS.
A spooled file is output with one line for each TAA or user command
found in a statement.
You may check a specific source file in a library, all source files
in a library, all source files in the system, or all source files in
libraries that do not start with the letter Q.
You may request both user and TAA commands be listed, just the TAA
commands, or just the user commands.
An option exists to omit named libraries.
If a command cannot be found or invalid syntax exists, it will be
flagged in the listing.
Identifying a Command
---------------------
Commands are found by searching the source and scanning for a command
name in valid CL syntax. Commands within variables (such as used in
QCMDEXC) are not found. Commands specified for parameters like CMD
on SBMJOB are found.
Identifying a TAA Command
-------------------------
From a system viewpoint, a TAA command is a user command. CHKUSRCMD
identifies a TAA command if the command name exists in the TAA
Archive and the library value is:
- Blank (meaning the library list is used)
- Qualified to TAATOOL
- Qualified to the TAA Productivity Tool command library
(as specified on install or with DUPTAACMD)
TAA Source
----------
When the TAA Productivity Tools are shipped, there are some empty
source files in TAATOOL. The source for the tools is kept in an
archive which is not a standard source file. For this reason,
CHKUSRCMD will not find any TAA commands within the source files of
TAATOOL unless you have copied out some of the source.
Commands in QSYS
----------------
The CHK400CMD TAA Tool is used to identify the user commands. It
does this by checking CL source for each command name found and then
checking against an array of command names within the tool programs.
The CHK400CMD tool is built using the commands for the current
release and a few program products. Most system program products
place their commands in QSYS as part of the install of the product.
If you re-create the CHK400CMD tool, it will use the commands from
your version of QSYS. You may also add or omit certain commands by
describing them in specific members within the TAASECURE library.
See the discussion with the CHK400CMD tool.
CHKUSRCMD command parameters *CMD
----------------------------
SRCFILE The qualified file name of the source file to be
checked. Either a specific source file may be named
or the special value *ALL for all source files.
You must have *ALLOBJ special authority to specify
LIB(*ALL) or LIB(*ALLUSR).
The library qualifier defaults to *LIBL. *LIBL may
only be used when a specific file is named.
If *ALL source files are requested, you may name a
specific library, *ALL for all libraries, or
*ALLUSR2 for all normal user libraries.
*ALLUSR2 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.
TYPE The type of user command to be checked for. *ALL is
the default which means that any command found that
is not in QSYS is considered. See the previous
documentation for the definition of commands in
QSYS.
*TAA may be specified to list only the TAA user
commands. The means the command name used exists in
the TAA Archive and the qualified name is blank
(meaning *LIBL), TAATOOL, or the command library
used for TAA Tool commands.
*USER may be specified to list only the user
commands that are not recognized as TAA Tool
commands. See the previous documentation for how a
user command is distinguished from a system command.
OMITLIBS A list of up to 40 libraries to be omitted if the
qualified library name for the SRCFILE parameter is
*ALL or *ALLUSR2. The default is *NONE. If *ALL or
*ALLNONQ are not used, *NONE must be specified.
OUTLIB The library in which the USRCMDP file will be
placed. The default is *NONE meaning no outfile
will be created.
*LIBL may be specified. If the USRCMDP file does
not already exist, a library must be specified.
OUTMBR The member of the USRCMDP file to be used. If the
member does not exist, it is added. The default is
USRCMDP.
REPLACE A *YES/*NO value for whether the member should be
cleared before writing records into it. The default
is *YES.
*NO may be specified to add records to an existing
file.
Restrictions
------------
** The CHK400CMD tool is used to determine user commands. It has
restrictions relative to how a command is interpreted from
source.
** You must have *ALLOBJ special authority to specify LIB(*ALL)
or LIB(*ALLUSR).
** See also the previous comments in the documentation.
Prerequisites
-------------
The following TAA Tools must be on your system:
CHK400CMD Check 400 command
CVTLIBDBF Convert library data base files
EDTVAR Edit variable
EXTLST2 Extract list 2
RTVSYSVAL3 Retrieve system value 3
RTVTAALIC Retrieve TAA license
SNDCOMPMSG Send completion message
SNDESCMSG Send escape message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
CHKUSRCMD *CMD TAACMEA QATTCMD
TAACMEAC *PGM CLP TAACMEAC QATTCL
TAACMEAC2 *PGM CLP TAACMEAC2 QATTCL
TAACMEAR *PGM RPG TAACMEAR QATTRPG
TAACMEAP *FILE PF TAACMEAP QATTDDS
|