TAA Tools
PRTRPGDO       PRINT RPG DO GROUPS                        TAARPGH

The Print  RPG  DO groups  command prints  RPG source  and provides  an
indentation  of the DO  groups (including  IF, CAS, and  SELEC groups).
Both  RPG III  and RPG  IV formats are  supported.   PRTRPGDO is useful
for program documentation and  can be of assistance when  attempting to
understand the flow of a program.

A typical command is entered as:

    PRTRPGDO      SRCMBR(PGMA)

The following shows some sample output:

***********************************************************************

 Seq

 1.00      C                      DO
 2.00      C                      *  MOVE                   A         B
 3.00      C                      ENDDO
 4.00      C                      DO
 5.00      C                      *  MOVE                   C         D
 6.00      C           FLDA       *  IFEQ                   FLDB
 7.00      C* Comments appear as is without offsetting
 8.00      C           FLDC       *  *  IFNE                'X'
 9.00      C                      *  *  *  MOVE             E         F
10.00      C                      *  *  *  MOVE             G         H
11.00      C                      *  *  ENDIF
12.00      C                      *  ENDIF
13.00      C                      ENDDO

   Total records-   13
***********************************************************************

Resulting   indicators  appear   with   dashes  to   allow  an   easier
determination  of  which type  is  specified.   For example,  if  22 is
specified as a 'low indicator'  for COMP, the indicator column  appears
as '--22--'.

SELEC statements  are considered  like a  DO group.   Any  WH or  OTHER
statements are  also considered DO groups with  the exception that they
do not end with and END statement.

The RPG  compiler  also  provides  an  indentation  option.    PRTRPGDO
allows you  to review  indented source  without compiling the  program.
In  addition,  the PRTRPGDO  listing  is smaller  because  it does  not
include  any externally described data  and /COPY statements brought in
by the compiler.

PRTRPGDO escape messages you can monitor for
--------------------------------------------

      TAA9894    Not an RPG source type

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

Excess indentation and errors
-----------------------------

If excess indenting occurs, +++ appears in the right hand portion
of the listing (to the left of the source statement date).
If errors occur (such as too many ENDIFs), the error condition is
noted in the right hand portion of the listing (to the left of
the source statement.

RPG IV Format
-------------

RPG IV  statements are  truncated in  the Comments  section because  of
the printed  layout.  Part  or all of  the comment section  is overlaid
if excess indenting or errors occur.

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

   SRCMBR        The source member name.

   SRCFILE       The  qualified  source  file  name  which defaults  to
                 QRPGSRC with *LIBL.

   INDCHR        The character to  be used to note  indentation.  *  is
                 the default.

   INDSPC        The number of  spaces to indent the groups.   3 is the
                 default.  2 or 4 may also be specified.

   FROMSTMT      The  From  statement  to  print  source records  from.
                 *FIRST is  the default  for the  first record  in  the
                 member.   A  source  sequence  number may  be  entered
                 such as 100 or 100.00.

   TOSTMT        The To  statement to print  source records to.   *LAST
                 is  the default for the last  record in the member.  A
                 source sequence number may  be entered such as 110  or
                 110.00.

   DSPSPLF       Whether to  display the spooled file  when the command
                 is  completed.  *YES  is the default  which causes the
                 page headings to  be eliminated  and the spooled  file
                 displayed  by  DSPSPLF  if   the  command  is  entered
                 interactively.     The  spooled  file  is  deleted  on
                 completion.

                 If  the  command  is  entered  in  batch  or  *NO   is
                 specified,  page headings  will  be produced  and  the
                 spooled file is retained.

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

None.

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

The following TAA Tools must be on your system:

         CHKOBJ3        Check object 3
         RTVSYSVAL3     Retrieve system value 3
         SNDCOMPMSG     Send completion message
         SNDESCMSG      Send escape message

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

None, the tool is ready to use.

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

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

   PRTRPGDO      *CMD                      TAARPGH        QATTCMD
   TAARPGHC      *PGM          CLP         TAARPGHC       QATTCL
   TAARPGHR      *PGM          RPG         TAARPGHR       QATTRPG
   TAARPGHR2     *PGM          RPG         TAARPGHR2      QATTRPG
					

Added to TAA Productivity tools April 1, 1995


Home Page Up to Top