TAA Tools
RTVCMDSRC2      RETRIEVE COMMAND SOURCE 2              TAACMFD

The Retrieve  Command  Source 2  command is  designed  to retrieve  the
source for  system commands.  It differs from  RTVCMDSRC which does not
provide  prompt text for  system commands.  In  order to provide prompt
text for  keywords,  the  command help  text  is  accessed.   You  must
correctly perform  the actions described in the  prompt when RTVCMDSRC2
is used.  Several restrictions exist.

You must have *ALLOBJ special authority to use RTVCMDSRC2.

When  RTVCMDSRC is  used on a  system command,  the prompt  text in the
extracted simulated source  normally appears  as PROMPT(TXTnnnn).   The
TXT message  ID is not  shipped in QSYS.   When the command  is created
as  part of QSYS, special  message files are used  that are not shipped
with the system.

RTVCMDSRC2 uses  the text  in the  command help  to act  as the  prompt
text.   In  most cases,  this is  the same  text  you will  see in  the
system command prompt.

A typical RTVCMDSRC2 command would be:

             RTVCMDSRC2    CMD(DSPJOBD)

A display  appears which describes the actions that  must be taken when
the  display of the command help  text for the DSPJOBD command appears.
Press Enter on the current display  to use the default of 'G' to  Go to
the command help display.

If  the  help  display  appears   with  a  message  saying  that  'Help
information  is incomplete', you may be able  continue.  Press Enter if
a message appears  saying an error  occurred while printing.   Some  of
the output may not be complete.

When the help  display appears, press F14  to print and then  the Enter
key.

This causes  a QSYSPRT file to be  created which the command processing
program reads  to  determine  the  prompt  text.    The  TAA  RTVCMDSRC
command is  used to create  a simulated version  of the command  source
and  the prompt  text from  the help  text is  merged into  the command
source.

By  default,  the  source is  written  to  the QCMDSRC  file  using the
member name of  the command.   The member must not  exist (it is  added
by RTVCMDSRC2).

There  are   several  situations  where  the  prompt   text  cannot  be
determined.   Some of  these relate to  the use of  ELEM commands where
the initial  prompt  is  not known.    QUAL statement  within  an  ELEM
commands are not  supported.  In addition,  some inconsistencies within
the  system help text prevent  access to the command  prompt text.  The
RTVCMDSRC2 command  attempts  to  do  what  it  can.    The  completion
message  will   describe  whether  is   was  completely   or  partially
successful.

RTVCMDSRC2 escape messages you can monitor for
----------------------------------------------

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

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

   CMD           The  qualified name of  the system  command.   It must
                 be a command in QSYS.

   SRCFILE       The  source  file which  will  contain the  member for
                 the retrieved source.   The library value  defaults to
                 *LIBL.   A  specific library  or *CURLIB  may  also be
                 used.

   MBR           The  member to  contain the retrieved  command source.
                 The member  must  not exist.    It  will be  added  by
                 RTVCMDSRC2.

                 *CMD is  the default  meaning to  use the same  member
                 name  as the  CMD parameter name.   A  specific member
                 may be entered.


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

There  are  several  situations  where   the  prompt  text  cannot   be
determined.   Some of these  relate to the  use of ELEM  commands where
the  initial  prompt is  not  known.   QUAL  statement  within an  ELEM
commands  are not supported.   In addition, some inconsistencies within
the system help text  prevent access to the  command prompt text.   The
RTVCMDSRC2  command  attempts  to  do  what it  can.    The  completion
message   will  describe  whether   is  was   completely  or  partially
successful.

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

The following TAA Tools must be on your system:

     CHKALLOBJ       Check *ALLOBJ special authority
     CHKOBJ3         Check object 3
     CHKSPLF         Check spooled file
     DSPCMDHLP       Display command help
     PMTOPR          Prompt operator
     RSNLSTMSG       Resend last message
     RTVCMDSRC       Retrieve command source
     RTVSPLFID       Retrieve spooled file ID
     SNDCOMPMSG      Send completion message
     SNDDIAGMSG      Send diagnostic 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
   ------        ----    ---------      ----------    ----------

   RTVCMDSRC2    *CMD                   TAACMFD       QATTCMD
   TAACMFDC      *PGM       CLP         TAACMFDC      QATTCL
   TAACMFDR      *PGM       RPG         TAACMFDR      QATTRPG
					

Added to TAA Productivity tools January 1, 2008


Home Page Up to Top