TAA Tools
SCNSRCSEU       SCAN SOURCE SEU                        TAASRFI

The Scan  Source SEU  command scans  one or  more members  in a  source
file for  up 20 different arguments.   If an argument  is found, STRSEU
is  used on the  member in either  *CHANGE or *BROWSE  mode.  SCNSRCSEU
provides a  better function than  the WRKMBRPDM  Option 25 solution  to
review or change members where the same string of characters exist.

SCNSRCSEU is better than the WRKMBRPDM option 25 because:

  **   You can scan for multiple arguments.

  **   You  can do  a generic  search of  members without  entering the
       option value for each member to be scanned.

  **   The ADDBLANKS parameter can be used to bypass false matches.

  **   A  status message describes the sequence  number where the first
       instance of any argument was found.

A typical command would be:

             SCNSRCSEU  SRCFILE(xxx) ARGUMENT(ABC DEF)

All source members would be scanned in  the named file.  If ABC or  DEF
appears  in  any of  the  source  statements,  a status  message  would
appear  for 2 seconds  describing the  argument found and  the sequence
number where  it  was found.    SEU would  then  be invoked  in  either
change or browse mode.

If  many   consecutive  members   are  scanned   without  finding   any
arguments,  a  status  message will  appear  with  the  member name  to
indicate progress through the file.

SCNSRCSEU escape messages you can monitor for
---------------------------------------------

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

SCNSRCSEU Command parameters                          *CMD
----------------------------

   SRCFILE       The  qualified name of the  source file to be scanned.
                 The  library value  defaults  to  *LIBL.   A  specific
                 library or *CURLIB may also be used.

   ARGUMENT      Up  to 20  bytes  to use  in  the scan  and  up to  20
                 arguments.   This is  the string or  strings that will
                 be scanned for.   You may need  to surround the  value
                 in quotes  and enter  in lower  case depending on  the
                 value  in   the  source.    Trailing  blanks  will  be
                 trimmed off.  See also the TRANSLATE parameter.

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

   TRANSLATE     A  *YES/*NO option  that defaults  to *NO  meaning the
                 argument  value is  used  as  is.    However,  if  the
                 argument value  is not in quotes, the  value is folded
                 to  upper case  by  the system  command function.   To
                 scan for  a lower  case value,  surround the  argument
                 with quotes and use TRANSLATE(*NO).

                 *YES causes the  source statement to be  translated to
                 upper case  before scanning for the  argument.  If you
                 are not  sure  of  the case  in  the  source,  specify
                 *YES.

   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 may 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 string  such as  'red '  which are  followed
                 by a blank.

   OPTION        The SEU  option to  be used.   *CHANGE is  the default
                 to  invoke  STRSEU  with  OPTION(2).    You must  have
                 *CHANGE authority to the file.

                 *BROWSE  may  be  specified  to  invoke  STRSEU   with
                 OPTION(5).    You  must have  *USE  authority  to  the
                 file.

   LIST          A  *NO/*YES option  for  whether a  listing  should be
                 output  with  one  line  per  member  where  the first
                 sequence  number   was   found  that   contained   any
                 argument that was searched for.

                 *NO is the default meaning no listing occurs.

                 *YES  may be specified  to create  a listing  with one
                 line  per member where  the first  argument was found.
                 The sequence number, the  argument, and an  indication
                 of whether  the member  was changed is  also provided.


Restrictions
------------

None.

Prerequisites
-------------

The following TAA Tools must be on your system:

     CHKDBFMBR       Check data base file member
     RTVMBRLST       Retrieve member list
     EDTVAR          Edit variable
     EXTLST2         Extract list 2
     RSNLSTMSG       Resend last message
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message

Implementation
--------------

None, the tool is ready to use.

Objects used by the tool
------------------------

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

   SCNSRCSEU     *CMD                   TAASRFI       QATTCMD
   TAASRFIC      *PGM       CLP         TAASRFIC      QATTCL
   TAASRFIC2     *PGM       CLP         TAASRFIC2     QATTCL
   TAASRFIR      *PGM       RPG         TAASRFIR      QATTRPG
   TAASRFIR2     *PGM       RPG         TAASRFIR2     QATTRPG
					

Added to TAA Productivity tools April 15, 2011


Home Page Up to Top