TAA Tools

The  Scan Source  2  command  is the  inverse  of the  SCNSRC  command.
SCNSRC2 scans  for an argument  and lists the  name of the  member in a
spooled  file if  the argument  does not exist.   One,  generic, or all
members in a source file may be scanned.  An outfile is optional.

If the outfile is  requested, the SCNSRC2P file  is output.  The  model
file used for the outfile is TAASREVP with a format name of SCSRCR.

The value to be scanned for cannot span a source record.

A typical command would be:


All members of  the QRPGSRC file would be scanned.   A listing would be
output of any member that did not contain the string ABC.

Command parameters                                    *CMD

   FILE          The  qualified name of the source  file to be scanned.
                 To simplify  the entering  of system  supplied  source
                 file  names, you  may use  the standard  abbreviations
                 like *RPG, *RPGLE, *CLP etc.

                 The  library defaults  to *LIBL.   A  specific library
                 name or the special value *LIBL may be used.

   ARGUMENT      The argument to  be scanned for.   Because the  system
                 command function  folds the value  to upper  case, you
                 may need  to surround the  value in quotes.   Trailing
                 blanks will be trimmed off.

   MBR           The  member  name.    The  default  is  *ALL  for  all
                 members in  a  file.   A specific  name  or a  generic
                 member name may be entered.

   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.

                 *NO does not cause translation.

   ADDBLANKS     The  number of  blanks  to  add  to  the  end  of  the
                 argument before scanning.

                 0 is  the default meaning the  length of the  data for
                 each argument determines what is scanned for.

                 A value in a range of 0 to 3 must be entered.

                 The  intent of  this parameter is  to provide  for the
                 situation such as when  you want to  scan for the  end
                 of a  name or  word ending  in 'red', but  you do  not
                 want  words  such  as  'redeem'.   Using  ADDBLANKS(1)
                 finds  any words such as  'altered' which are followed
                 by a blank.

   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  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.

   NOTFOUND      A *YES/*NO  option  that  determines  if  the  TAA9897
                 escape message  will be  sent if  one or more  members
                 are found without the argument.

                 *NO is  the default meaning only  a completion message
                 is sent.

                 *YES  means  that  if  one  or  more  members  do  not
                 contain the  argument, the  TAA9897 escape message  is

   OUTLIB        The  library  in  which  the  file  SCNSRC2P  will  be
                 placed.   The  file will  contain one  record for each
                 member  that does  not  contain  the  argument.    The
                 model  file used for  the outfile  is TAASREVP  with a
                 format name of SCSRCR.

                 The  default is *NONE  meaning no  outfile is created.
                 *LIBL may be entered if  the SCNSRC2P exists.  If  the
                 SCNSRC2P  file  does  not  exist, a  library  must  be

   OUTMBR        The  member of the SCNSRC2P  file to be used.   If the
                 member does not exist,  it is added.   The default  is

   REPLACE       A  *YES/*NO value  for whether  the  member should  be
                 cleared before writing records into it.

                 *YES is the default to clear the member first.

                 *NO  may be specified  to add  records to  an existing


The value to be scanned for cannot span a source record.


The following TAA Tools must be on your system:

      DUPTAADBF    Duplicate TAA data base file
      EDTVAR       Edit variable
      HLRMVMSG     HLL Remove message
      RTVDBFA      Retrieve data base file attributes
      RTVMBRLST    Retrieve member list
      RTVSYSVAL3   Retrieve system value 3
      SNDCOMPMSG   Send completion message
      SNDESCINF    Send escape information
      SNDESCMSG    Send escape message
      SNDSTSCNT    Send status count


None, the tool is ready to use.

Objects used by the tool

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

   SCNSRC2       *CMD                      TAASREV        QATTCMD
   TAASREVC      *PGM          CLP         TAASREVC       QATTCL

   TAASREVR      *PGM          RPG         TAASREVR       QATTRPG
   TAASRCFP      *FILE         PF          TAASREVP       QATTDDS

Added to TAA Productivity tools June 1, 2005

Home Page Up to Top