The Compare Source Parameters command compares the parameter lists
between two source members. The command is intended to assist in
determining that the parameter lists are identical between the From
and To source members.
A typical command would be:
CMPSRCPARM FRMMBR(CMD1) FRMSRCFILE(xxx) +
The command determines the source types of the From and To members.
The following are supported:
From member To member
Assume that the From member is type CMD and the To member is type
CLP. Because command definition source can only have a single call
(it is implicit), the value *FIRSTCALL must be used. The attributes
of the parameters are retrieved for the From command source and the
To CLP source.
A listing is made of two sets of columns (one for the From member and
one for the To member). Each parameter is listed along with the name
used, the length, type, and decimal positions for both the From and
Differences are noted as follows:
** A difference in the type, length, or decimal
%% The definition of the parameter cannot be
determined. This is a typical result when an
externally described file cannot be found and it
contains the definition.
## A mismatch in the number of parameters.
The number of parameters and the total length of each parameter list
is also compared.
It is also possible to compare the parameter list passed from a Call
within CLP or RPG source to another entry parameter list of CLP or
RPG source. The parameter CALLNAME determines which call in the From
source (default of *FIRSTCALL) should be used. If it is other than
the first Call in the source, you may identify the source sequence
number of the Call or use a name.
RPG Decimal array lengths will be the internal length of the element
times the number of elements. If you have an element of 5 digits and
0 decimals, the internal value is packed to 3 bytes.
Command parameters *CMD
FRMMBR The member name that is performing the Call. The
source member type must be CMD, CLP, CLLE, RPG,
RPGLE, RPGMOD, or RPG38.
FRMSRCFILE The qualified file name of the From source file.
The special values *CMD, *CLP, or *RPG may be used
to mean the standard source file names. The library
defaults to *LIBL. *CURLIB may also be specified.
CALLNAME The name in the From source where the Call operation
can be found. The default is *FIRSTCALL meaning the
first or only Call operation. CMD type source must
CLP or RPG type source may specify a name. For CLP
source, the name would be the value used for the PGM
parameter on the CALL. This could be a literal or
variable name. For RPG source, the name would be
that which is found in Factor 2 of the CALL
operation. The actual implementation of the RPG
Name function is to take the value specified and
scan the Factor 2 field.
A statement number may be entered to identify the
Call operation to be used in the From source. A 6
digit entry must be used with all digits entered and
no decimal point. For example, if the CALL
statement is 150.00 in SEU, specify 015000 as the
statement number. The statement number is intended
for the case where you have multiple calls to the
same program name and you need to be specific. If a
Call command has continuation source records, the
statement number of the first record must be used.
TOMBR The member name that has the entry list of
parameters. The source member type must be CLP,
CLLE, RPG, RPGLE, RPGMOD, or RPG38.
TOSRCFILE The qualified file name of the To source file. The
special values *CMD, *CLP, or *RPG may be used to
mean the standard source file names. The library
defaults to *LIBL. *CURLIB may also be specified.
RQDEXTDSC Determines whether any externally described files
are required. *YES is the default. If an
Externally Described file is specified in the
source, it must exist on the library list or an
escape message will occur.
*NO may be specified in which case if an Externally
Described file exists, the field specifications are
used. If an Externally Described file does not
exist, no error occurs, but the information about
some of the fields may be missing.
OUTPUT How to output the results. * is the default.
*PRINT may be specified. This is the same
definition as most DSP commands.
MISESCAPE Whether to send an escape message if mismatches
occur. *NO is the default and the command will
complete normally if mismatches occur. *YES may be
specified to cause an escape message if mismatches
occur which can be helpful when writing a batch
Only certain source types are supported. See the FRMMBR and TOMBR
Several base tools are used to access the parameters and attributes
including RTVCMDPARM, RTVCLPVAR, and RTVRPGFLD. These tools have
The following TAA Tools must be on your system:
EXCOUTPUT Execute output
RTVCLPCALL Retrieve CLP Call parameters
RTVCLPVAR Retrieve CLP variables
RTVCMDPARM Retrieve command parameters
RTVRPGCALL Retrieve RPG Call parameters
RTVRPGPARM Retrieve RPG parameters
RTVSYSVAL3 Retrieve system value 3
SNDESCMSG Send escape message
None, the tool is ready to use.
Objects used by the tool
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
CMPSRCPARM *CMD TAASRDN QATTCMD
TAASRDNC *PGM CLP TAASRDNC QATTCL
TAASRDNC2 *PGM CLP TAASRDNC2 QATTCL
TAASRDNC3 *PGM CLP TAASRDNC3 QATTCL
TAASRDNR *PGM RPG TAASRDNR QATTRPG
TAASRDNC CL pgm
TAASRDNR RPG Pgm
TAASRDNC2 CL pgm - RTV From
TAASRDNC3 CL pgm - RTV To