CVTPGMA2 CONVERT PROGRAM ATTRIBUTES 2 TAAPGOC |
The Convert Program Attributes 2 command converts program object
(*PGM) information to an outfile with one record per program. This
includes module information for up to 100 modules which is written as
an array. This allows simple processing of programs that are made up
of multiple modules. The same information as available with CVTPGMA
plus the module information is output by CVTPGMA2.
The model file is TAAPGOCP with a format name of PGMRCD.
A typical command would be:
CVTPGMA2 PGM(xxx/*ALL) PGMTYPE(*ILE)
OUTLIB(QTEMP)
All ILE programs in the specified library would be found and one
record would be written for each to the PGMATRP2 file in QTEMP. The
first part of the record has standard information for any program
including OPM programs. The PGARR field contains module information.
PGARR Field
-----------
The PGARR field contains 100 elements of 200 bytes each. Each
element has information for one module. The element may be moved to
a data structure with the following definition:
MOD 1 10 Module name
MODLIB 11 20 Module library
MODATR 21 30 Module attribute
MODSFR 31 40 Source file
MODSFL 41 50 Source library
MODSFM 51 60 Source member
MODOWN 61 70 Owner
MODCRD 71 77 Create date
MODCRT 78 83 Create time
MODRLS 84 89 Release created on
MODRL2 90 95 Release created for
MODSCD 96 102 Last source change date
MODSCT 103 108 Last source change time
MODTXT 109 158 Text description
MODCSD 109 163 CCSID
MODDBG 164 167 Debug data
MODOPL 168 172 Optimization level
173 200 Reserved
If a program has less than 100 modules, the remaining module
information is blank. OPM programs do not have modules and all
module information is blank.
The RPGLE code for the TAAPGOCR program contains the data structure
PGARRDS with the D specs that define an element. The source can be
copied to a source file with the following command:
CPYTAA TAAARCMBR(TAAPGOCR) TOSRCF(xxx/yyy)
CVTPGMA2 escape messages you can monitor for
--------------------------------------------
TAA9891 No programs exist for the program type
Escape messages from based on functions will be re-sent.
CVTPGMA2 Command parameters *CMD
---------------------------
PGM The qualified name of the program whose attributes
and modules should be converted. A generic name or
*ALL may be specified.
The library value defaults to *LIBL. The library
name can be a specific library or the special values
*USRLIBL, *CURLIB, *ALL or *ALLUSR.
PGMTYPE The type of program to convert information for.
*ILE is the default for ILE programs.
*OPM may be specified for OPM programs.
*ALL may be specified for both types of programs.
OUTLIB The library in which the file PGMATRP2 will be
placed. The default is *LIBL. If the PGMATRP2 file
does not already exist, a library must be specified.
OUTMBR The member of the PGMATRP2 file to be used. If the
member does not exist, it is added. The default is
PGMATRP2.
REPLACE A *YES/*NO value for whether the member should be
cleared before writing records into it. The default
is *YES.
*NO may be specified to add records to an existing
file.
Restrictions
------------
Only information from the first 100 modules is created.
Because the outfile format exceeds 9,999 bytes, the outfile may only
be read by a program which allows a large record length. Use DSPFMT
TAAPGOCP for the exact length.
Prerequisites
-------------
The following TAA Tools must be on your system:
CVTMODINF Convert module information
DUPTAADBF Duplicate TAA data base file
EDTVAR Edit variable
RTVDAT Retrieve date
RTVPGMA Retrieve program attributes
RTVSYSVAL3 Retrieve system value 3
SNDCOMPMSG Send completion message
SNDESCINF Send escape information
SNDESCMSG Send escape message
SNDJLGMSG Send job log message
SNDSTSMSG Send status message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
CVTPGMA2 *CMD TAAPGOC QATTCMD
TAAPGOCC *PGM CLP TAAPGOCC QATTCL
TAAPGOCR *PGM RPGLE TAAPGOCR QATTRPG
TAAPGOCP *FILE PF TAAPGOCP QATTDDS
|
Added to TAA Productivity tools July 15, 2010