TAA Tools
DSPRPGCNT       DISPLAY RPG COUNT                      TAASRET

The Display  RPG  Count command  counts the  number of  lines of  code,
array  data,  and  comments in  a  source  file.    All RPG  types  are
supported.   A percentage of comments  is provided.  DSPRPGCNT provides
a better understanding  of the amount of  actual source versus a  count
of the number of statements in a source member.

A typical command would be:


All  members  in  the  QRPGSRC  file  of the  named  library  would  be
processed.   A spooled file would be output  with one line for each RPG
source type member.

The OUTPUT  parameter  controls whether  a  display appears  after  the
spooled file  is created.  If  DSPRPGCNT is entered  interactively, the
default displays the spooled file and then deletes it.

RPG Spec Types

The following RPG source types are supported:


Counting technique

An  RPG comment is denoted  by an *  in position 6.   If an  * does not
exist, a line of RPG code is counted.

When '**'  is found  in  positions 1-2,  the  line and  any  additional
lines in the member are counted as array data.

DSPRPGCNT escape messages you can monitor for

      TAA9891    No members exist in the file.
      TAA9892    The individual member specified does not exist.
      TAA9892    No generic members exist for the generic name.

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

Command parameters                                    *CMD

   SRCFILE       The  qualified   name  of  the   source  file   to  be
                 processed.  The default is QRPGSRC.

                 The  library value  defaults  to *LIBL.    *CURLIB may
                 also be used.

   MBR           The  member,  generic  member  name,  or  the  special
                 value  *ALL   (all  members   in  the   file)  to   be

   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.




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
     RTVMBRLST       Retrieve member list
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     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
   ------        ----    ---------      ----------    ----------

   DSPRPGCNT     *CMD                   TAASRET       QATTCMD
   TAASRETC      *PGM       CLP         TAASRETC      QATTCL
   TAASRETR      *PGM       RPG         TAASRETR      QATTRPG

Added to TAA Productivity tools June 1, 2005

Home Page Up to Top