RPLPGM REPLACE PROGRAM TAAPGMC
The Replace Program command re-creates an existing program using the
parameters that are stored in the object. Most program types are
supported including multi-module ILE programs.
The intent of RPLPGM is to provide a simple re-create when only the
source statements have been changed.
A typical command would be entered as:
RPLPGM extracts the libraries specified for any externally described
files used in the program (if not already on the library list) and
adds them to the current library list when the program is re-created.
The same libraries are then removed.
RPLPGM extracts the existing parameters from the object (e.g.
ALWRTVSRC and RMVOBS) and re-creates the object. The source
file/library/member information is used from the object unless
specified on the command. REPLACE(*YES) is specified on the create
command which will place the old object into the QRPLOBJ library,
copy the authorizations and re-establish the values of USRPRF and
USEADPAUT. The TEXT parameter value is taken from the source member
and not the existing object. CHGPGM is used for attributes which
only exist on CHGPGM.
Not every parameter on all of the create commands is supported.
RPLPGM uses the sub tools RTVPGMA, RTVILEPGMA, and RTVILEMODA. These
commands do not support all possible parameters.
Error messages you may wish to monitor for are:
TAA9891 ILE program failed due to module or service pgm
TAA9892 Create module or single bound program failed
TAA9893 CRTPGM failed
TAA9895 A supported source type does not have the
corresponding create command on the system
TAA9896 An unknown or unsupported source type exists
TAA9897 Program exceeds 135 modules or 277 service pgms
To replace a program that adopts authority using USRPRF(*OWNER)
requires *SECADM authority. No pre-check occurs. A specific escape
message will occur.
The CRTxxxPGM commands for S/38 did not support the REPLACE
parameter. This handles the USRPRF parameter, copies authorizations,
and deletes the old program if the create is successful.
This replace function is simulated by RPLPGM. The new version is
created in QTEMP with the USRPRF value of the original program,
authorizations are copied from the old version, the old version is
deleted, and the new version is moved.
Command parameters *CMD
PGM The qualified name of the program to be replaced.
The library defaults to *LIBL.
SRCFILE The qualified name of the source file to be used.
The default is *OBJD meaning to use the same file as
is specified in the object description (the source
file originally used).
To use a different source file, specify both the
source file and source file library (*LIBL may be
used for the library name).
SRCMBR The source member to be used. The default is *OBJD
meaning to use the same source member as is
specified in the object description (the source
member originally used).
GENLVL The generation severity level specifies the
diagnostic-message severity level at which creation
of the program stops.
*DFT is the default which is passed thru to the
CRTRPGxxx or CRTCBLxxx commands to use the default
supplied by the compilers.
A specific value between 1 and 50 may be entered,
but see the specific command for a narrower range.
ALWRTVCL Whether to allow the retrieve of CL source if a CL
program is replaced. The default is *SAME meaning
the current attribute of the program for ALWRTVSRC
is used. *YES or *NO may be specified to override
the current attribute.
RMVOBS How the observable information (the debug)
capability should be handled. *SAME is the default
which means the same as the existing program. *ALL
may be specified to make the program fully
observable. *NONE may be specified to remove the
Note that you cannot compress the observability with
this option. If it is already compressed, replacing
the program will cause the full observability to be
re-created. You must use the CPROBJ system command
or consider the use of the SQZPGMSIZ TAA tool.
TGTRLS The target release of the program that will be
created. This is the same value as used on several
CRT program commands and is passed thru to the CRT
*CURRENT is the default. *PRV may be specified.
Use the command prompter to see the specific release
names that may also be entered.
OWNER Who should be the owner of the new object. The
default is *SAME, meaning the same owner will exist.
If the owner is the group profile of the current
user, OWNER(*SAME) may be used. Otherwise, you must
be the owner or have *ALLOBJ special authority to
*NEW may be specified to allow you to become the
owner of the program. You must have the *OBJEXIST
right to the existing program to specify *NEW.
To replace a program that adopts authority using
USRPRF(*OWNER) requires *SECADM authority.
DLTSPLF A *YES/*NO parameter for whether the spooled file
for the compiler listing should be deleted if the
create is successful. *NO is default meaning the
spooled file is always retained.
*YES may be specified to delete the spooled file if
the create is successful.
DETAIL The type of CRTPGM listing to output for ILE
programs. The default is *NONE meaning no listing
*BASIC, *EXTENDED, or *FULL may be specified which
are passed thru to the CRTPGM command. See the
CRTPGM DETAIL parameter for a full explanation.
The following program types are supported.
The TGTRLS parameter is not supported. The RPG parameter IGNDECERR
and ALWNULL are not supported.
Some ILE parameters are not supported. For example, if observability
is removed from a program created by CRTBNDRPG or CRTBNDCL, the
information is not available to specify on CHGPGM.
To replace a program that adopts authority using USRPRF(*OWNER)
requires *SECADM authority.
ILE programs are limited to 135 modules per program and 277 service
programs per program.
The following TAA Tools must be on your system:
CHKALLOBJ Check *ALLOBJ special authority
CHKSECADM Check *SECADM special authority
RTVILEMODA Retrieve ILE module attributes
RTVILEPGMA Retrieve ILE program attributes
RTVPGMA Retrieve program attributes
RTVPGMREFL Retrieve program reference libraries
SNDCOMPMSG Send completion message
SNDESCMSG Send escape message
SNDDIAGMSG Send diagnostic message
SNDSTSMSG Send status message
None, the tool is ready to use.
Objects used by the tool
Object Type Attribute Src member Src file
------ ----- --------- ---------- -----------
RPLPGM *CMD TAAPGMC QATTCMD
TAAPGMCC *PGM CLP TAAPGMCC QATTCL
TAAPGMCC2 *PGM CLP TAAPGMCC2 QATTCL
TAAPGMCC3 *PGM CLP TAAPGMCC3 QATTCL
Added to TAA Productivity Tools
April 1, 1995
Last modified on March 10, 2014
© 1995, 2014 - TAA Tools, Inc.