TAA Tools
SCNCLPCMD       SCAN CLP COMMAND                       TAACLTE

The Scan  CLP Command scans  CL source members  for up to  50 different
command  names.   A  display  or  listing is  output.    An outfile  is
optional.   SCNCLPCMD offers better  function that the system PRTCMDUSG
command in terms of finding  command usage.  If an outfile  is created,
the model file in TAATOOL is TAACLTEP with a format name of CMDRCD.

You must have valid CL syntax to properly scan the source.

Assume you  want to scan a  source file for the  commands CRTUSRPRF and
CHGUSRPRF.  You would specify:


All  CL source members  (type CLP, CL,  and CLLE) would  be scanned for
the two commands.  A display would appear with the results.

Comparison with PRTCMDUSG

SCNCLPCMD does the following as opposed to PRTCMDUSG.

  **   Scans source and not object code.

  **   Allows a command to be  found using a qualified library name  of
       '*ANY'.   PRTCMDUSG requires  a library name  or *LIBL  and will
       not  find both  uses in  a single  pass.   If you  have multiple
       command objects  with the  same name,  the use  of *ANY  can  be
       very helpful.

  **   Finds commands  that  are in  the CMD  or  RQSDTA parameters  of

  **   Finds commands  that are used  in a CHGVAR command  such as when
       building a command string for use by QCMDEXC.

  **   Provides   better  output  format  that  includes  the  sequence
       number, the  first 90 bytes  of the statement,  the text of  the
       member, and a better summary.

  **   Provides an optional outfile.

SCNCLPCMD escape messages you can monitor for

      TAA9892    Used when writing an outfile and errors exist
                    Causes the listing to be output

Escape messages from based on functions will be re-sent.

SCNCLPCMD Command parameters                          *CMD

   CMD           The  qualified  name  of  up  to  50  commands  to  be
                 scanned  for.   The  library value  defaults  to *ANY.
                 This means that only the  command name is checked  for
                 as opposed to both the command and qualified name.

                 A specific  library name  or *LIBL  may be  used.   If
                 *LIBL  is  specified,  any  unqualified command  names
                 are found.  For example,  CRTUSRPRF would be found  by
                 its  use  in   a  source  member  as   'CRTUSRPRF'  or

   SRCFILE       The  qualified   source  file  name   to  be  scanned.
                 QCLSRC   is  the  default.     The  library  qualifier
                 defaults to  *LIBL.   *CURLIB  or a  specific  library
                 name may be entered.

   SRCMBR        The  member  or generic  member  name  to be  scanned.
                 *ALL is the default.

                 Only  source  member types  of  CL, CLP,  or  CLLE are

   MBRTXT        A *YES/*NO parameter for  whether to print the  member
                 text  for   any  source  members  where   a  specified
                 command is found.

                 *YES  is the  default which  causes  an extra  line of

                 *NO may be  specified to prevent  the line of  output.

   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  the command  is  entered  in batch  or  *PRINT  is
                 specified, the  spooled file  is output  and retained.

                 *OUTFILE  may be  specified to  cause an  output file.
                 If an outfile  is created, the  model file in  TAATOOL
                 is TAACLTEP  with a format name  of CMDRCD.   The name
                 of the file is always CLPCMDP.

   OUTLIB        The  library  to  output the  CLPCMDP  file  to.   The
                 default is  *LIBL  which  may  only  be  used  if  the
                 CLPCMDP file  may be found  on the  library list.   If
                 the file does not exist, a library must be named.

   OUTMBR        The  member  to  be   written  to.    The  default  is

   REPLACE       A  *YES/*NO parameter for whether  to replace the data
                 in the  outfile.   The default is  *YES.   *NO may  be
                 specified to add to the existing data.

   OUTFILERCD    Whether to  output one  record for each  command found
                 or one per member.

                 *ALL  is the  default  to output  one record  for each
                 command found.

                 *ONEPERMBR may be specified  to output one record  per
                 member regardless of how many commands were found.


  **   You must have valid CL syntax to properly scan the source.

  **   Commands  other  than  SBMJOB  may  also  support  a  *CMD  type
       parameter.  These are not scanned for.


The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3
     CVTMBRLST       Convert member list
     DUPTAADBF       Duplicate TAA data base file
     EDTVAR          Edit variable
     EXTLST          Extract list
     HLRMVMSG        HLL Remove message
     RSNLSTMSG       Resend last message
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message
     SNDSTSCNT       Send status count
     SNDSTSMSG       Send status message


None, the tool is ready to use.

Objects used by the tool

   Object        Type    Attribute      Src member    Src file
   ------        ----    ---------      ----------    ----------

   SCNCLPCMD     *CMD                   TAACLTE       QATTCMD
   TAACLTEC      *PGM       CLP         TAACLTEC      QATTCL
   TAACLTER      *PGM       RPG         TAACLTER      QATTRPG
   TAACLTEP      *FILE      PF          TAACLTEP      QATTDDS

Added to TAA Productivity tools January 15, 2009

Home Page Up to Top