TAA Tools
CRTRTVDCL       CREATE RETRIEVE DCLs                   TAACLTP

The Create Retrieve DCLs  command creates DCL commands in  a CLP source
member  for  a  named  RTV  command.    Rather  than  keying  the  DCLs
manually,  CRTRTVDCL  may  be  used  to generate  all  the  DCLs  for a
retrieve command  that  allows return  variables.   The  source  member
must exist.

Assume you  are coding  a CL program  and want to  use the  TAA RTVCLSA
command  to retrieve one or more return  variables.  The variables must
be declared with  DCL statements.   Rather than  keying them  yourself,
you could use the following command:

             CRTRTVDCL  RTVCMD(RTVCLSA) SRCMBR(xxx)

The  source  member  must  exist.     The  RTVCMDSRC  command  is  used
internally  to  generate  simulated  command  source  for the  command.
This  source  is  then  read  and  any  PARM  statements  that  specify
RTNVAL(*YES) are  used to  generate a  DCL statement that  is added  to
the  SRCMBR member.   The MOVCLPDCL  command is  then used to  move the
DCLs after the last DCL (if any) in the source.

The  RTVCMDSRC command  has restrictions  and is  not 100%  accurate on
certain commands.

CRTRTVDCL escape messages you can monitor for
---------------------------------------------

      TAA9892    No PARM statements contain RTNVAL(*YES)

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

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

   RTVCMD        The command  to  be used  to  generate DCL  statements
                 for.   The  command  must contain  PARM keywords  with
                 RTNVAL(*YES).

   SRCMBR        The   source   member  to   add   the   generated  DCL
                 statements to.    The  member  must exist.    The  DCL
                 statements  are  added  after  the  last  DCL  in  the
                 source member.

   SRCFILE       The  source  file  where  the  source  member  exists.
                 QCLSRC  is  the  default  file  name.    The   library
                 qualifier defaults to  *LIBL.  A specific  library may
                 be named or the special value *CURLIB.

   VARKWD        A *YES/*NO  parameter for whether  all keywords should
                 be generated for the DCL statement.

                 *YES   is  the   default  meaning   keywords  will  be
                 generated for the VAR, TYPE, and LEN keywords.

                 *NO may  be specified to  use the  shorthand form  for
                 the DCL  command where only  the LEN keyword  is used.
                 Positional   values  exist   for  the  VAR   and  TYPE
                 parameters.


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

Because RTVCMDSRC  is used,  there are  exceptions to  how some  system
commands  appear  (or can  even  be  retrieved)  which can  impact  the
created DCLs.

Some  system commands  use TYPE(*X).   These  are output  as TYPE(*DEC)
with LEN(15 0).

The RTVCMDSRC  command has  restrictions and  is not  100% accurate  on
certain commands.

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

The following TAA Tools must be on your system:

     ABORT           Abort
     CHKOBJ3         Check object 3
     EDTVAR          Edit variable
     HLRMVMSG        HLL Remove message
     MOVCLPDCL       Move CLP DCL statements
     RSNLSTMSG       Resend last message
     RTVCMDSRC       Retrieve command source
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   TAACLTP       *CMD                   TAACLTP       QATTCMD
   TAACLTPC      *PGM       CLP         TAACLTPC      QATTCL
   TAACLTPR      *PGM       RPG         TAACLTPR      QATTRPG
					

Added to TAA Productivity tools January 15, 2011


Home Page Up to Top