TAA Tools
MOVCLPDCL       MOVE CLP DCLs                          TAACLQR

The Move CLP DCLs  command moves DCL and DCLF  statements from anywhere
in CL or  CLLE source to the correct place in  the source.  This allows
you  to  enter  a  DCL  statement when  you  are  coding  and  then use
MOVCLPDCL before compiling the program.

For example,  assume you  need a  work  field before  writing a  CVTDAT
command.  Rather  than returning to the top of  the source and entering
a  DCL for  the work field  and then  returning to  the source location
where the CVTDAT  command is, just  enter the DCL  before or after  the
CVTDAT command.   Before compiling,  use MOVCLPDCL  to move the  DCL to
the proper place in the source.

A typical command would be:

            MOVCLPDCL      MBR(ABC)

Member  ABC in  the  first QCLSRC  file on  the library  list  would be
read.   Any statements  before  the first  command (excluding  the  PGM
command) would  be  written to  a temporary  file.   Any  DCL and  DCLF
statements would  be added to  an array within  the program.   A second
array is used for non-DCL statements.

When  all the statements  have been read,  the DCL array  is written to
the temporary file  followed by the  statements from the second  array.
The temporary file  is then written to the  file specified (the default
is the same file and member).

MOVCLPDCL escape messages you can monitor for
---------------------------------------------

      TAA9891    New member requested and it already exists
      TAA9892    New outfile requested and members exist
      TAA9893    MOVCLPDCL failed

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

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

   MBR           The  member to  have  its DCL  statements moved.   The
                 special  value  *ALL  exists  for  all  members  in  a
                 source file.   Only the members of source  type CLP or
                 CLLE will be processed.

   INPSRCF       The  qualified  file name  of the  input  source file.
                 The library  value defaults  to  *LIBL.   *CURLIB  may
                 also be used.   The file must be a source  file with a
                 maximum record length of 240 bytes.

   OUTSRCF       The  qualified file  name of  the output  source file.
                 The  file  defaults to  *INPSRCF meaning  the modified
                 source will be written  back to the input source  file
                 member if no errors occur.

                 The  library qualifier defaults  to blank  which means
                 to  use  the  same library  as  the  INPSRCF.   *LIBL,
                 *CURLIB, or  a  specific  library may  also  be  used.
                 The file  must be a source  file with a  record length
                 that is  equal or greater than  the input source file.

                 You must have *OBJMGT authority to the file.

                 If a single member is  being processed to a  different
                 file (not being  updated), the member must  not exist.

                 If  all members  in a  file are  being processed  to a
                 different  file, no  members may  exist in  the output
                 source file.   Any  members which  are not  of a  type
                 CLP  or CLLE  will be  identified on  the  listing and
                 will not appear in the output file.

   TAASTDERR     A  *YES/*NO value  that  determines if  DCL statements
                 should be moved ahead of TAA Standard Error code.

                 *YES is the  default which  will move  any DCLs  found
                 after the  first program  statement ahead  of the  TAA
                 Standard  error   code  DCLs  if  they   exist.    TAA
                 Standard Error code  DCLs are  determined by  scanning
                 a DCL statement for '/* Standard error */'.

                 If your  code  does not  have any  TAA Standard  Error
                 handling  DCLs,   the  DCLs  found   after  the  first
                 program  statement are moved  before the first program
                 statement.   It  operates  the  same  as  if  you  had
                 specified *NO.

                 *NO  may be specified  to always  move any  DCLs found
                 after  the  first program  statement  after  the first
                 program statement.

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

  **   The number of  non-DCL statements  (source lines) cannot  exceed
       9999.

  **   The  number  of  DCL  statements (source  lines)  cannot  exceed
       9999.

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

The following TAA Tools must be on your system:

     FIXCLPSRC       Fix CLP source - sub program for copying
     HLRMVMSG        HLL Remove message
     RTVDBFA         Retrieve data base file attributes
     RTVSYSVAL3      Retrieve system values 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
   ------        ----    ---------      ----------    ----------

   MOVCLPDCL     *CMD                   TAACLRQ       QATTCMD
   TAACLRQC      *PGM       CLP         TAACLRQC      QATTCL
   TAACLRQR      *PGM       RPG         TAACLRQR      QATTRPG
					

Added to TAA Productivity tools April 15, 2006


Home Page Up to Top