TAA Tools
RTVCMDA       RETRIEVE COMMAND ATTRIBUTES               TAACMDE

The Retrieve Command  Attributes command allows  you to extract  one or
more attributes  from an existing command into a  CL program.  This can
be  used for various  functions in working  with commands.   If a proxy
command is  named, the  return information  is relative  to the  target
command.

RTVCMDA uses the API QCDRCMDI to access the information.

A  typical use  of  the command  is  to extract  the  PGM parameter  to
determine the name of the command processing program:

        RTVCMDA     CMD(CMDA) PGM(&PGM)

The  command parameters  may  be prompted  for with  the command.   The
value in the  parenthesis for each parameter  describes the length  and
type  of field  to  be specified  in  your CL  program  to receive  the
parameter.

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

   CMD           The   qualified  command   definition  object.     The
                 library defaults to *LIBL.

   RTNLIB        An optional  return  variable that  will  contain  the
                 library name where  the command definition  was found.
                 The  value may  be helpful  if the  command definition
                 is  accessed  without  a specific  library  name.   If
                 specified,  the variable  must  be declared  as  *CHAR
                 LEN(10).

                 If proxy  command is  found, the  information relative
                 to the target command is returned.

   PGM           An  optional  return variable  that  will  contain the
                 CPP (Command  Processing Program)  of the  program  to
                 be run.   If specified, the variable  must be declared
                 as *CHAR LEN(10).

   PGMLIB        An  optional  return variable  that  will  contain the
                 library of  the CPP  (Command Processing  Program)  of
                 the program  to be  run.   If specified, the  variable
                 must be declared as *CHAR LEN(10).

   PGMLIB        An  optional  return variable  that  will contain  the
                 library  of  the CPP  (Command Processing  Program) of
                 the program  to be run.   If  specified, the  variable
                 must be declared as *CHAR LEN(10).

   SRCFILE       An  optional return  variable  that  will contain  the
                 name  of the source  file used to  create the command.
                 If specified, the variable  must be declared as  *CHAR
                 LEN(10).

   SRCFILELIB    An  optional return  variable  that  will contain  the
                 name  of the library  containing the  source file used
                 to create  the command.   If  specified, the  variable
                 must be declared as *CHAR LEN(10).

   SRCMBR        An  optional return  variable  that will  contain  the
                 name  of   the  source  member  used   to  create  the
                 command.     If   specified,  the   variable  must  be
                 declared as *CHAR LEN(10).

   VLDCKR        An  optional return  variable  that will  contain  the
                 name  of   the  validity  checker   program  (if  any)
                 specified   for  the  command.     If  specified,  the
                 variable must be declared as *CHAR LEN(10).

   VLDCKRLIB     An optional  return  variable that  will  contain  the
                 name of  the library of  the validity  checker program
                 (if  any) specified  for the  command.   If specified,
                 the variable must be declared as *CHAR LEN(10).

   MODE          An optional return variable  that will contain a  list
                 of the modes where  the command is valid to  run.  The
                 values returned  in the list may be  *PROD, *DEBUG, or
                 *SERVICE.   A space will  separate the values to allow
                 for the parameter to  be placed in a Change  or Create
                 command.     If  specified,   the  variable   must  be
                 declared as *CHAR LEN(100).

   ALLOW         An  optional return  variable  that will  contain list
                 of where  the command  is valid  to run.   The  values
                 returned  in  the  list   may  be  *BATCH,  *INTERACT,
                 *BPGM,  *IPGM,  *BREXX, *IREXX,  *IMOD, or  *EXEC.   A
                 space will  separate  the  values  to  allow  for  the
                 parameter  to  be   placed  in  a  Change   or  Create
                 command.     If  specified,   the  variable   must  be
                 declared as *CHAR LEN(100).

   ALWLMTUSR     An  optional return variable that  will contain a *YES
                 or *NO for  whether the command can  be run by a  user
                 who is  limited.  If  specified, the variable  must be
                 declared as *CHAR LEN(4).

   MAXPOS        An  optional  return variable  that  will  contain the
                 maximum number of  positional parameters.   The  value
                 returned will  be *NOMAX  or a number  from 0-75.   If
                 specified,  the  variable must  be  declared  as *CHAR
                 LEN(6).

   PMTFILE       An optional  return  variable that  will  contain  the
                 name  of  the  message file  (if  any)  used  for  the
                 prompt  text.  *NONE  will be  returned if  no message
                 file  was specified.  If  specified, the variable must
                 be declared as *CHAR LEN(10).

   PMTFILE       An optional  return  variable  that will  contain  the
                 name  of the  library used  for the  message  file (if
                 any)  used for  the  prompt text.   If  specified, the
                 variable must be declared as *CHAR LEN(10).

   MSGF          An optional  return  variable that  will  contain  the
                 name of  the message  file (if  any) used  on the  DEP
                 statements.    If  specified,  the  variable  must  be
                 declared as *CHAR LEN(10).

   MSGFLIB       An optional  return  variable that  will  contain  the
                 name of  the library which  contains the  message file
                 (if any)  used on the  DEP statements.   If specified,
                 the variable must be declared as *CHAR LEN(10).

   HLPPNLGRP     An  optional  return  variable that  will  contain the
                 name of the help  panel group object (if any)  used to
                 supply help  text for the command.   If specified, the
                 variable must be declared as *CHAR LEN(10).

   HLPPNLGRPL    An  optional  return variable  that  will  contain the
                 name of the  library of  the help  panel group  object
                 (if any)  used to  supply help  text for the  command.
                 If specified,  the variable must be  declared as *CHAR
                 LEN(10).

   HLPID         An optional  return  variable that  will  contain  the
                 name of the help  ID used to supply help  text for the
                 command.   The value  may be  *CMD, *NONE, or  a name.
                 If  specified, the variable must  be declared as *CHAR
                 LEN(10).

   HLPSCHIDX     An optional  return  variable  that will  contain  the
                 name  of  the  help  search  index (if  any)  used  to
                 supply  help text for the command.   If specified, the
                 variable must be declared as *CHAR LEN(10).

   HLPSCHIDXL    An optional  return  variable that  will  contain  the
                 name of  the library  which contains  the help  search
                 index  (if  any)  used to  supply  help  text for  the
                 command.    If   specified,  the   variable  must   be
                 declared as *CHAR LEN(10).

   CURLIB        An  optional return  variable  that will  contain  how
                 the  current  library  position  of the  library  list
                 will  be set.   The value will  be *NOCHG, *CRTDFT, or
                 a library name.   If specified,  the variable must  be
                 declared as *CHAR LEN(10).

   PRDLIB        An  optional return  variable  that  will contain  the
                 name  of a  library used  to be  used for  the product
                 library  portion  of  the   library  list  while   the
                 command  is  running.    The  value  will  be  *NOCHG,
                 *NONE,  or   a  library  name.     If  specified,  the
                 variable must be declared as *CHAR LEN(10).

   PMTOVRPGM     An optional  return  variable that  will  contain  the
                 name of  the prompt  override program  to be used  (if
                 any).   If  specified, the  variable must  be declared
                 as *CHAR LEN(10).

   PMTOVRPGML    An  optional  return  variable that  will  contain the
                 name  of  the   library  which  contains  the   prompt
                 override program  to be used (if any).   If specified,
                 the variable must be declared as *CHAR LEN(10).

   RSTTGTREL     An  optional  return variable  that  will  contain the
                 release ID if the  command is restricted to  executing
                 on  a release.   If  specified, the  variable must  be
                 declared as *CHAR LEN(6).

   THDSAFE       An   optional  return   variable  that   will  contain
                 whether  the   command   is  safe   for   multi-thread
                 operations.   *YES  will be  returned  if the  command
                 can  be  used  in  multiple  threads.    *NO  will  be
                 returned  if the  command cannot  be used  in multiple
                 threads.

                 *COND will be returned  if the command can be  used in
                 multiple threads  in certain situations.   The command
                 documentation must be considered.

                 If  specified, the variable must  be declared as *CHAR
                 LEN(5).

   OWNER         An optional  return  variable that  will  contain  the
                 owner   of  the   command  definition   object.     If
                 specified,  the  variable must  be  declared  as *CHAR
                 LEN(10).

   ACTCMD        An optional  return  variable that  will  contain  the
                 name  of   the  actual  command.     If   the  command
                 specified  for the CMD  parameter is a  proxy command,
                 the  return variable  returns the  name of  the actual
                 command.   If it  is not  a proxy  command, the  value
                 will be  the same name  as that input.   If specified,
                 the variable must be declared as *CHAR LEN(10).

   ACTCMDLIB     An  optional  return variable  that  will  contain the
                 name of the  actual command library.   If the  command
                 specified for  the CMD  parameter is a  proxy command,
                 the  return variable  returns the  name of  the actual
                 command library.  If  it is not  a proxy command,  the
                 value will  be the  same name  as that  of the  RTNLIB
                 parameter.    If   specified,  the  variable  must  be
                 declared as *CHAR LEN(10).

   PXYCMD        An  optional  return  variable that  will  contain the
                 name  of  the command  where  the  command  definition
                 object  exists if  the command  specified for  the CMD
                 parameter  is a proxy command.   If it is  not a proxy
                 command, the value will be  blank.  If specified,  the
                 variable must be declared as *CHAR LEN(10).

                 If the  command specified for  the CMD parameter  is a
                 proxy command,  the other return values  exist for the
                 target command.

   PXYCMDLIB     An optional  return  variable that  will  contain  the
                 name  of  the library  where  the  command  definition
                 object  exists if  the command  specified for  the CMD
                 parameter  is a proxy  command.  If it  is not a proxy
                 command, the value will  be blank.  If specified,  the
                 variable must be declared as *CHAR LEN(10).

                 If the  command specified for  the CMD parameter  is a
                 proxy  command, the other return  values exist for the
                 target command.

   TEXT          An optional  return  variable that  will  contain  the
                 text  description of  the  command definition  object.
                 If  specified, the variable must  be declared as *CHAR
                 LEN(50).

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

If more than  5 proxy commands  exist, most of the  return fields  will
be  blank.    The  CAPXY and  CAPXYL  fields  will  reflect  the  proxy
command.  The CATEXT will contain an indication.

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

The following TAA Tools must be on your system:

           EDTVAR       Edit variable
           SNDESCMSG    Send escape message

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

None, the tool is ready to use.

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

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

   RTVCMDA       *CMD                      TAACMDE        QATTCMD
   TAACMDEC      *PGM          CLP         TAACMDEC       QATTCL
					

Added to TAA Productivity tools April 1, 1995


Home Page Up to Top