TAA Tools
DSPRPGFLD       DISPLAY RPG FIELDS                     TAARPGN

The   Display  RPG   Fields   command   displays  the   fields,   their
definitions, and usage from an RPG source member.

A typical command would be:

             DSPRPGFLD   MBR(xxx) SRCFILE(yyy)

This would  display the fields in the program  with the definitions and
use in field name order.

An option exists to sequence the fields by:

           Field name (Default)
           Type and field name
           Type, length, and field name
           Length and field name
           Use and field name
              (Usage is Chgd, Used, or blank (only defined)

The  tool uses the RTVRPGFLD tool  which has certain restrictions.  The
major restrictions are:

  **   Up to 3996 fields may be defined in the program.

  **   An Externally  described file  or  data structure  may be  used,
       but  the  object must  be  on the  library  list  to access  the
       definition.   A  command option  exists to  prevent an  error if
       the external object does not exist.

  **   /COPY is valid to access  other source members to contribute  to
       the field  definitions.  Any copied  in members may  not contain
       a /COPY statement.  (No embedded /COPY statements).

  **   The RPG  specifications must be valid.   The correct syntax must
       be used and  the code must  compile into a  program without  any
       assumed field definitions.

  **   Indicators are not considered.

For  a more  detailed  understanding of  Field  usage, length  and  the
restrictions, see the RTVRPGFLD tool.

Other comments
--------------

Decimal  array  lengths will  be  the internal  length  of the  element
times  the number of elements.  If you  have an element of 5 digits and
0 decimals, the internal value is packed to 3 bytes.

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

   MBR           The RPG  member to  be  used.   It must  be type  RPG,
                 RPGLE, RPGMOD, or RPG38.

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

   SEQ           The sequence of  the output.   The default is  *FLDNAM
                 meaning the fields are output in field name order.

                 *TYPE may  be specified  to output  field name  within
                 type.

                 *TYPELEN  may   be  specified  to  output  field  name
                 within length within type.

                 *LEN may  be specified  to  output field  name  within
                 length.

                 *USE  may be  specified to  output  field name  within
                 usage.   The first group of fields  are those that are
                 changed  in  the  program  such  as  if  defined  as a
                 Result field for a MOVE operation.

                 The second  group is for  those fields  that are  only
                 used in the  program such as the field  is in Factor 2
                 of  a MOVE  operation, but  never appears as  a Result
                 field of a MOVE.

                 The third group is for  those fields that are  defined
                 in  a  program,  but  not used  in  a  Calculation  or
                 Output Specification.

   RQDEXTDSC     Determines  whether  any  externally  described  files
                 are  required.     *YES  is  the   default.    If   an
                 Externally  Described   file  is   specified  in   the
                 source,  it  must exist  on  the  library  list or  an
                 escape message will occur.

                 *NO  may be specified  in which case  if an Externally
                 Described file  exists, the  field specifications  are
                 used.    If  an  Externally Described  file  does  not
                 exist,  no  error occurs,  but  the  information about
                 some of the fields may be missing.

   OUTPUT        How  to  output  the  results.    *  is  the  default.
                 *PRINT  may   be  specified.     This   is  the   same
                 definition as most DSP commands.

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

The tool uses the RTVRPGFLD tool which has several restrictions.

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

The following TAA Tools must be on your system:

     EXCOUTPUT       Execute OUTPUT parameter
     RTVRPGFLD       Retrieve RPG fields
     RTVSYSVAL3      Retrieve system value 3
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message

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

None, the tool is ready to use.

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

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

   DSPRPGFLD     *CMD                   TAARPGN       QATTCMD
   TAARPGNC      *PGM       CLP         TAARPGNC      QATTCL
   TAARPGNR      *PGM       RPG         TAARPGNR      QATTRPG
					

Added to TAA Productivity tools August 1, 1996


Home Page Up to Top