RTVSRCTYP RETRIEVE SOURCE TYPE TAASRDX |
The Retrieve Source Type command retrieves the name of the associated
source file by using a source type such as RPG, CLP, etc. Some valid
source types do not have a corresponding source file in which case
*NONE is returned. The command can also be used to ensure a valid
source type.
A typical set of commands would be:
DCL &SRCFILE *CHAR LEN(10)
DCL &TEXT *CHAR LEN(45)
.
RTVSRCTYP SRCTYPE(RPG) SRCFILE(&SRCFILE) TEXT(&TEXT)
The value QRPGSRC would be returned for the &SRCFILE variable. The
description of the source type would be returned in the &TEXT
variable.
For a full discussion of valid source types, see the PRTSRCTYP tool.
All source types from the WRKMBRPDM MBRTYPE parameter help text are
supported along with those defined in the help text for the
Programmer Menu 'Type' field (STRPGMMNU command). Not all source
types have a corresponding file in which case *NONE will be returned.
RTVSRCTYP escape messages you can monitor for
---------------------------------------------
TAA9894 Invalid source type
Escape messages from system commands will be re-sent.
Command parameters *CMD
------------------
SRCTYPE The source type to return the file for. The valid
values are CLP, RPG, etc as defined by the help text
for the WRKMBRPDM MBRTYPE parameter and the 'Type'
field on the Programmers Menu (STRPGMMNU).
SRCFILE An optional return variable for the source file name
associated with the source type. *NONE will be
returned if the source type does not have a
corresponding file name. If used, it must be
specified as *CHAR LEN(10).
TEXT An optional return variable for the description of
the source type. *NONE will be returned if the
source type does not have a corresponding file name.
If used, it must be specified as *CHAR LEN(50).
Restrictions
------------
See the previous discussion.
Because the command returns values, it can only be used in a CL
program.
Prerequisites
-------------
The following TAA Tools must be on your system:
PRTSRCTYP Print source type
SNDESCMSG Send escape message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
RTVSRCTYP *CMD TAASRDX QATTCMD
TAASRDXC *PGM CLP TAASRDXC QATTCL
|
Added to TAA Productivity tools March 1, 1999