CRTRPGCALL CREATE RPG CALL PARAMETERS TAARPHT |
The Create RPG Call Parameters command creates the CALL and PARM
statements for an RPG or RPGLE source member using the entry
parameter list from a program (CLP, RPG, or a single module
RPGLE/CLLE). After ensuring an RPG source member exists, CRTRPGCALL
may be used to add records for the CALL and PARM statements. This
simplifies building the proper interface between an RPG program and
the program to be called.
To perform the inverse function of creating the entry parameter list
for an RPG program, see the CRTRPGENT command.
To use CRTRPGCALL, the source for the program to be called must still
exist where the program was created from. This prevents the use of
CRTRPGCALL if a system program is specified.
A typical use of CRTRPGCALL is where you want to do a call from the
RPG program PGMA to a program named PGMB. PGMB exists and could be a
CLP, RPG, or single module RPGLE/CLLE program.
Assume you want to use CRTRPGCALL to generate the required CALL and
PARM statements needed to pass the parameters to PGMB. Assume that
PGMB is an RPG program with the following statements:
C *ENTRY PLIST
C PARM PARM1 5
C PARM PARM2 10
C PARM PARM3 30
Any externally described files used by the program must exist on the
library list.
It is not necessary to define the lengths of the parameters on the
PARM statement. As long as the definitions exist within the source
or in an externally described file, CRTRPGCALL will find the
definitions.
After ensuring that the RPG source member PGMA exists of a type RPG
or RPGLE, enter
CRTRPGCALL SRCMBR(PGMA) PGM(PGMB)
The following statements would be added to the PGMA member:
C* Created by CRTRPGCALL from xxxx in yyyy on 05/07/09
C 'yyyy 'CAT ' ' ZZQUAL 21 P
C CAT '/':0 ZZQUAL
C 'xxxx 'CAT ' ' ZZPGMN 10
C CAT ZZPGMN:0 ZZQUAL
C CALL ZZQUAL
C PARM PARM1 6
C PARM PARM2 20
C PARM PARM3 50
Using the ZZQUAL field allows a 10 character program and or library
name to be used when generating the call statement. A qualified name
is used for the CALL operation.
You will normally need to move these statements to the proper place
within the source.
CRTRPGCALL escape messages you can monitor for
----------------------------------------------
None. Escape messages from based on functions will be re-sent.
Command parameters *CMD
------------------
SRCMBR The source member to have RPG or RPGLE statements
for CALL and PARMs written to. The member must
exist.
The type of source member determines whether the
created statements will be in an RPG or RPGLE
format.
PGM The qualified name of the program which has an entry
parameter list to create the CALL and PARM
statements from. The program must have an attribute
of CLP, RPG, or RPGLE/CLLE (single module).
The source member used to create the object must
still exist where the object was created from. This
prevents the use of CRTRPGCALL when naming a system
program.
The library qualifier defaults to *LIBL. A specific
library or *CURLIB may also be used.
SRCFILE The qualified name of the source file where the RPG
member exists which will have statements added to.
QRPGSRC is the default.
The library qualifier defaults to *LIBL. A specific
library, or *CURLIB may also be used.
Restrictions
------------
The source for the program or command must still exist where the
object was created from. This prevents the use of CRTRPGCALL when
the named object is a system program.
Any externally described files used by the program must exist on the
library list.
The number of RPG parameters is limited to 100.
The source member to be added to must be of type RPG or RPGLE.
Prerequisites
-------------
The following TAA Tools must be on your system:
CHKOBJ3 Check object 3
EDTVAR Edit variable
HLRMVMSG HLL Remove message
RSNLSTMSG Resend last message
RTVCLPCALL Retrieve CLP call parameters
RTVDAT Retrieve date
RTVDBFA Retrieve data base file
RTVPGMA Retrieve program attributes
RTVRPGPARM Retrieve RPG entry parameters
SNDCOMPMSG Send completion message
SNDDIAGMSG Send diagnostic message
SNDESCINF Send escape information
SNDESCMSG Send escape 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
------ ---- --------- ---------- ----------
CRTRPGCALL *CMD TAARPHT QATTCMD
TAARPHTC *PGM CLP TAARPHTC QATTCL
TAARPHTR *PGM RPG TAARPHTR QATTRPG
|
Added to TAA Productivity tools June 30, 2007