TAA Tools
DSPCMDCNT       DISPLAY CMD COUNT                      TAASRES

The Display CMD  Count command counts  the number of lines  of commands
in a CMD  or CMD38 source member, generic members,  or all members in a
source  file.   Comment  lines and  blank lines  are  also counted.   A
percentage of  comments  is  provided.   DSPCMDCNT  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:

             DSPCMDCNT    SRCFILE(xxx/QCMDSRC) MBR(*ALL)

All  members  in  the  QCMDSRC  file  of  the  named  library would  be
processed.  A spooled file would  be output with one line for each  CMD
or CMD38  source type  member.   A count  of the  lines with  commands,
comments, and blank lines would be provided.

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

Counting technique
------------------

If a comment appears in  a statement along with a command,  the line is
counted as a command.

If  a single command  takes more than  one source statement,  it counts
as  one command.   The 2nd thru  Nth lines of  each command are counted
as  'Additional Command  Lines'.   If  an  additional  line is  only  a
comment, it is still counted as an 'additional line'.

If  a comment  takes more  than one  line, each  line is  counted  as a
comment.

Blank lines are counted separately.

DSPCMDCNT 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 QCMDSRC.

                 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
                 processed.

   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
------------

None.

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

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

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

None, the tool is ready to use.

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

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

   DSPCMDCNT     *CMD                   TAASRES       QATTCMD
   TAASRESC      *PGM       CLP         TAASRESC      QATTCL
   TAASRESR      *PGM       RPG         TAASRESR      QATTRPG
					

Added to TAA Productivity tools June 1, 2005


Home Page Up to Top