TAA Tools
SCNRPGFLD2      SCAN RPG FIELD 2                       TAARPHA

The  Scan RPG  Field 2  command  finds all  references  to a  specified
field name  in a member,  generic members, or  all members in  a source
file.   Only RPG source  types (including RPGLE) are  searched for.  If
the specified field is found  to change the data in another  field, the
derived  field  is  also searched  for.    The  command is  useful  for
determining the progress of a field and its data through a program.

A typical command would be:


All  references to  UDATE would  be found in  the generic  member names
beginning with  ABC.   If the  UDATE data  was used  to change  another
field such  as a  MOVE from  UDATE to YY,  the YY  field would  also be
searched  for.    The  field that  was  changed  is  termed a  'derived
field'.  If the  YY field were  moved to field ZZ,  the ZZ field  would
also be scanned for, etc.

A spooled file  would be created  with each statement listed  where the
scan field or a derived field is referenced.

If  you are  scanning for  the  field named  BBB and  an  RPG statement
moves  the data from  field AAA to BBB,  AAA is not  considered to be a
derived field.   Derived fields occur only  when the data in  the field
you named is used  to change a result field.  This  excludes the use of
index fields or modifiers such as used on CAT operations.

If  the field  being scanned  for is  a sub field  in an  internal data
structure, any  overlapping fields  are also  considered 'derived'  and
will  be scanned  for as  well  as the  data  structure name.   If  the
internal  data structure  name is  the  result field  of a  scanned for
field,  both  the  data  structure  name  and  all  fields  within  the
internal data structure are considered 'derived'.

Fields  within   an  externally  described   data  structure   are  not
considered 'derived' if the name of the data structure is changed.

Overlapped fields  within OPM Input Specifications  are also considered
to be derived fields.

If  the  specified source  file contains  source  types other  than RPG
types, they are bypassed.   The processed source types are  RPG, RPGLE,

Command parameters                                    *CMD

   FLDNAME       The  field  name  to   be  searched  for.    An  exact
                 comparison must exist (the field is not scanned).

                 If  a field is  used in  an operation such  as MOVE to
                 change a result  field, the result  field is known  as
                 a  'derived  field'.     The  derived  field  is  also
                 searched  for and any fields  derived from the derived

   SRCMBR        The  member  to  be  searched.    Either  a   specific
                 member, a  generic member name,  or the  special value
                 *ALL may  be specified.   If a generic  member name or
                 *ALL   is  entered,  only   RPG  type  source  members
                 (including RPGLE) are searched.

   SRCFILE       The qualified file name  of the source file.   QRPGSRC
                 is  the  default.    The  library  value  defaults  to
                 *LIBL.  *CURLIB may also be used.

   SPLFILES      The  number  of  spooled files  that  will  be output.
                 The default is  *ONE.  The default  must be used  when
                 a single member is specified.

                 If  you have  specified a  generic set  of members  or
                 all  members,  you have  a  choice as  to  whether the
                 output will  be  one  spooled  file  with  information
                 from all members  or a separate spooled file  for each
                 member.   To provide a separate spooled  file for each
                 member, specify *MULT.


Valid RPG source must exist.

Statements copied by /COPY are not considered.

Also see previous comments.


The following TAA Tools must be on your system:

     CHKGENERC       Check generic
     EDTVAR          Edit variable
     HLRMVMSG        HLL Remove message
     RTVDBFA         Retrieve data base file attributes
     RTVMBRLST2      Retrieve member list 2
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message


None, the tool is ready to use.

Objects used by the tool

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

   SCNRPGFLD2    *CMD                   TAARPHA       QATTCMD
   TAARPHAC      *PGM       CLP         TAARPHAC      QATTCL
   TAARPHAR      *PGM       RPG         TAARPHAR      QATTRPG

Added to TAA Productivity tools June 1, 1997

Home Page Up to Top