The Retrieve Service Program Module Attributes command retrieves the
attributes for a module of a Service Program. Either a module number
(default is first) or a module name may be specified.
The API QBNLSPGM is used to retrieve the attributes.
A typical command would be:
DCL &MODULE *CHAR LEN(10)
.
RTVSRVMODA SRVPGM(ABC) RTVNBR(1) MODULE(&MODULE)
The module name of the first module of the service program would be
returned. Additional return variables for such information as the
source file, library, and member may also be returned.
If the information for all of the modules should be returned, a loop
is needed in the CL program. The return value TOTMOD will describe
the total number of modules that exist.
Escape messages you may be interested in monitoring for:
- TAA9894 The RTVNBR number exceeds the modules in the pgm
- TAA9895 The RTVMOD name module does not exist in the pgm
Command parameters *CMD
------------------
SRVPGM The qualified service program to be retrieved. The
library value defaults to *LIBL. *CURLIB may also
be used.
RTVNBR The number of the module to be retrieved. The
default is 1. You must specify either a RTVNBR or
RTVMOD. RTVNBR(*NAME) must be specified if a module
name is used in the RTVMOD parameter.
RTVMOD The name of the module to be retrieved. The default
is *NONE meaning the RTVNBR parameter will be used.
*NONE must be used if a RTVNBR value other than
*NAME is specified.
RTNLIB An optional return variable that will contain the
library name where the service program was found.
The value may be helpful if the service program is
accessed without a specific library name. If
specified, the variable must be declared as *CHAR
LEN(10).
TOTMOD An optional return variable that will contain the
total number of modules in the service program. If
specified, the variable must be declared as *DEC
LEN(5 0).
MODNBR An optional return variable that will contain the
number of the module in the service program. This
value may be of interest if RTVMOD is used. If
specified, the variable must be declared as *DEC
LEN(5 0).
MODULE An optional return variable that will contain the
name of the module. If specified, the variable must
be declared as *CHAR LEN(10).
MODULEL An optional return variable that will contain the
name of the module library. If specified, the
variable must be declared as *CHAR LEN(10).
MODATR An optional return variable that will contain the
attribute of the module. If specified, the variable
must be declared as *CHAR LEN(10).
CRTDATE An optional return variable that will contain the
date the module was created in the format CYYMMDD.
If specified, the variable must be declared as *CHAR
LEN(7).
CRTTIME An optional return variable that will contain the
time the module was created in the format HHMMSS.
If specified, the variable must be declared as *CHAR
LEN(6).
SRCFILE An optional return variable that will contain the
source file used to create the module. If
specified, the variable must be declared as *CHAR
LEN(10).
SRCLIB An optional return variable that will contain the
library of the source file used to create the
module. If specified, the variable must be declared
as *CHAR LEN(10).
SRCMBR An optional return variable that will contain the
member of the source file used to create the module.
If specified, the variable must be declared as *CHAR
LEN(10).
RLSCRTON An optional return variable that will contain the
release the module was created on. The value will
be an entry such as V4R1M0. If specified, the
variable must be declared as *CHAR LEN(6).
RLSCRTFOR An optional return variable that will contain the
release the module was created for. This is the
target release of the module and is the earliest
release the module can run on. The value will be an
entry such as V4R2M0. If specified, the variable
must be declared as *CHAR LEN(6).
SRCCHGDATE An optional return variable that will contain the
date of last update of the source member in the
format CYYMMDD. If specified, the variable must be
declared as *CHAR LEN(7).
SRCCHGTIME An optional return variable that will contain the
time of last update of the source member in the
format HHMMSS. If specified, the variable must be
declared as *CHAR LEN(6).
CCSID An optional return variable that will contain the
Coded Character Set ID of the module. If specified,
the variable must be declared as *DEC LEN(5 0).
DEBUGDATA An optional return variable that will describe
whether the module contains debug data. Either a
*YES or *NO will be returned. If specified, the
variable must be declared as *CHAR LEN(4).
MAXOPTLVL An optional return variable that will contain the
Maximum Optimization Level of the module. If
specified, the variable must be declared as *DEC
LEN(5 0).
The values returned are explained in detail in the
API manual. The brief description is 65535 = Not
restricted, 40 = Maximum level, 30 = More
optimization is performed, 20 = Some optimization is
performed, 10 = No additional optimization is
performed.
Restrictions
------------
Because the command returns values, it may only be used in a CL
program.
Prerequisites
-------------
The following TAA Tools must be on your system:
CHKOBJ3 Check object 3
CRTUSRSPC Create user space
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
------ ---- --------- ---------- ----------
RTVSRVMODA *CMD TAAPGMX QATTCMD
TAAPGMXC *PGM CLP TAAPGMXC QATTCL
|