ANZRPGSRC       ANALYZE RPG SOURCE                     TAARPHO

 The Analyze  RPG Source command  outputs a listing  for a specific  RPG
 or  RPGLE source member.   Some information  is standard and  is always
 output  such as the number of comments and  counts by spec type.  Other
 information is  optional such  as  where subroutines  begin/end and  an
 operation code  summary.  Both RPG  III and RPG IV  (fixed form) member
 types are supported.

 The standard output includes:

         - Member level information including text, last change date
         - Number of comments
         - Spec type summary
         - Number of array records

 The optional output includes:

         - Number of changed specs based on a change date
         - Input parameter summary
         - Beginning and end of mainline and each subroutine
             - TAG locations within mainline and subroutines
             - Branch commands such as GOTO, CABxx
         - Operation code summary
         - Field definition list
         - Calls made to sub programs with parameters passed

 A typical command would be:

              ANZRPGSRC  MBR(xxx)

 All standard and optional analysis would be output for the member.

 ANZRPGSRC escape messages you can monitor for
 ----------------------------------------------

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

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

    MBR           The  member to  be  analyzed.   It must  be an  RPG or
                  RPGLE type.

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

    CHGDATE       The change  date to compare to.   *NONE is the default
                  to bypass checking for change dates.

                  A date may be  entered in job  format that will  cause
                  information  to  be output  for  how  many  statements
                  have been changed on or after the date.

                  The  RTVSRCCHG TAA  command is  used to  determine the
                  information.    See  the  Considerations  section  for
                  this tool.

    INPPARM       A   *YES/*NO   parameter   for   whether   the   input
                  parameters in  the program should be listed.   *YES is
                  the default to list the input parameters.

                  *NO may be specified to bypass the listing.

    SUBR          Whether  to  list  various  statement  numbers.    The
                  default is  *FULL to  list the  start and  end of  the
                  mainline  and  each subroutine,  any  TAG  operations,
                  and any branch operations (such as GOTO or CABxx).

                  *SUBRTAG   may  be   entered  to  bypass   the  branch
                  operations.

                  *SUBR may  be entered  to bypass  the TAG  and  branch
                  operations.

                  *NONE may be listed to bypass all the functions.

    OPCODE        A *YES/*NO  parameter for  whether a  summary will  be
                  output  of  each operation  code  used  with a  count.
                  *YES  is  the  default to  output  the  operation code
                  summary.

                  *NO may be specified to bypass the listing.

    FIELDEF       A *YES/*NO parameter  for whether to  list all of  the
                  fields defined  in the program.   *YES is  the default
                  to output the fields used and their definitions.

                  If  external files are  used to define  the fields and
                  the files  are on  the library  list, the  definitions
                  will  be used.   If  the  files cannot  be found,  the
                  definitions will be blank.

                  *NO may be specified to bypass the listing.

    CALLSUM       A  *YES/*NO parameter for  whether to list  all of the
                  calls  made  within  the  program  and  the  parameter
                  lists of  each.   *YES is  the default  to output  the
                  calls made.

                  *NO may be specified to bypass the listing.

    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.

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

   **   Valid RPG source per type is required.

   **   RPG IV free form is not supported.

   **   The CHGDATE function  uses the RTVSRCCHG TAA  command.  See  the
        Considerations for this function.

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

 The following TAA Tools must be on your system:

      CRTUSRIDX       Create user index
      CVTTIM          Convert time
      DSPRPGCALL      Display RPG calls
      DSPRPGFLD       Display RPG field
      EDTVAR          Edit variable
      HLRMVMSG        HLL Remove message
      RSNLSTMSG       Resend last message
      RTVDBFA         Retrieve data base file attributes
      RTVRPGFLD       Retrieve RPG fields
      RTVRPGPARM      Retrieve RPG parameters
      RTVSRCCHG       Retrieve source change
      RTVSYSVAL3      Retrieve system value 3
      SNDCOMPMSG      Send completion message
      SNDESCINF       Send escape information
      SNDESCMSG       Send escape message
      SNDSTSMSG       Send status message
      USRIDX          User index

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

 None, the tool is ready to use.

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

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

    ANZRPGSRC     *CMD                   TAARPHO       QATTCMD
    TAARPHOC      *PGM       CLP         TAARPHOC      QATTCL
    TAARPHOR      *PGM       RPG         TAARPHOR      QATTRPG
    TAARPHOR2     *PGM       RPG         TAARPHOR2     QATTRPG

 TAARPHOR is used for RPG III types.

 TAARPHOR2 is used for RPG IV types.

Added to TAA Productivity Tools June 15, 2004


Home Page

Powered by AS/400Powered by AS/400 Last modified on January 12, 2010 © 1995, 2010 - Jim Sloan, Inc.