The Replace Object command is designed to replace objects that are
created from source. It uses several other TAA tools to provide a
replace of Physical and Logical files, Display and Printer files,
Commands, Modules, and Programs. RPLOBJ can run over a single
object, generic objects, or all objects in a library.
RPLOBJ allows a simple means of changing one or more source members
and then re-creating one or more objects.
A typical command to replace all ABC objects would be:
RPLOBJ OBJ(ABC*)
Any ABC objects on the library list of type *FILE, *CMD, *MODULE, or
*PGM would be replaced. A message would exist for each ABC object
found of the supported types. A summary message describes the counts
of the types that were created. A listing is optional (instead of
detail messages).
If the replace fails, the existing object will remain. The compile
spooled file will remain and a flag occurs on the printed listing.
Another typical command would be:
RPLOBJ OBJ(xxx/*ALL)
This would replace all supported object types in the named library.
RPLOBJ relies on the information in the object description that
describes where the source was when the object was created. If the
source no longer exists, the object is flagged. The source for
single module ILE programs is determined by the use of the TAA
command RTVILEMODA and the program will be replaced. Multi-module
ILE programs and *SRVPGM objects are supported.
If you use a strategy of moving an object after it has been created,
see the CHGOBJSRC tool which allows you to change the reference
information within the object for where the source exists.
RPLOBJ Processing
-----------------
RPLOBJ begins by creating an outfile of the supported types *FILE,
*CMD, *MODULE, and *PGM.
Each of the supported types is re-created by a specific TAA Tool.
Prior to the re-create, internal RTV commands extract the existing
attributes of the object and include them on the appropriate CRT
command.
For example, the CRTDSPF command supports the RSTDSP parameter. This
value must be specified on the command and is not part of the DDS
source used to create the file. The attribute will be retrieved by
the internal RTV command and specified on the CRTDSPF command to
create the new version. The DDS source is used as specified in the
object.
The outfile of objects is then processed by multiple programs in the
following sequence:
** Physical files. The TAA Tool RPLPF is used. This will cause
any Physical file to be re-created and any dependent logical
files. The same members are created and data is copied using
CPYF with FMTOPT(*MAP and *DROP). This allows for simple file
changes such as adding a field, deleting a field, expanding a
field, etc.
** Logical files. Any logical files that are dependent on
physical files that are also being re-created in this use of
RPLOBJ are re-created by the prior step which uses RPLPF. Any
other logical files are re-created using RPLLF.
Note that in the messages or listing, it will appear as if all
logical files were created after all physical files are
re-created.
** Commands. Any command objects are replaced using the RPLCMD
tool.
** Modules. Any module objects are replaced using the RPLMOD
tool. This supports the source types CLE, CLLE, CBLLE, and
RPGLE.
** Programs. Any program objects are replaced using the RPLPGM
tool. This supports most source types. However, only single
module ILE programs of type CLLE and RPGLE are supported.
If any errors occur, the objects are flagged. An exception condition
exists for *FILE objects that were not created from source such as
Physical files created by specifying the RCDLEN parameter or Printer
files that do not have source. If the object does not include any
source information for these objects, they are flagged as exceptions,
but are not considered to be errors.
Considerations
--------------
** You must be authorized to delete any objects being replaced.
** The source must be where the object information describes its
existence.
** Each of the TAA RPLxxx commands has minor restrictions where a
re-create cannot be performed or seldom used parameters that
may have specified on the CRT are not handled. Most typical
functions are supported including multi-module ILE programs.
** See the OBJ parameter for use of a specific object name.
RPLOBJ escape messages you can monitor for
------------------------------------------
TAA9891 No objects were found
TAA9892 RPLOBJ completed, but found errors
Escape messages from based on functions will be re-sent.
Command parameters *CMD
------------------
OBJ The qualified name of the object to be replaced. A
specific name, a generic name, or the special value
*ALL may be used for all objects in a specific
library. The library value defaults to *LIBL.
*CURLIB may also be used.
If a specific object is named with a library name of
*LIBL or *USRLIBL, the DSPOBJD system command (used
to build the outfile that will be processed) will
return only the first instance where the object was
found. The same name in libraries further down the
library list will be ignored. This is not true if a
generic name is specified.
OBJTYPE The object type to be replaced. The default is *ALL
for all of the supported types.
*PGMMOD may be specified when objects should be
created to allow a save to a previous release. *PGM
and *MODULE objects are re-created. *FILE and *CMD
objects are not created as they can normally be
saved to a previous release.
*CMD, *FILE, *MODULE, or *PGM may also be specified
to create the specific object types.
TGTRLS The target release of the programs that will be
replaced. This is the same value as used on several
CRT program commands and is passed thru to the CRT
command.
*CURRENT is the default. *PRV may be specified.
Use the command prompter to see the specific release
names that may also be entered.
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.
DLTSPLF A *YES/*NO parameter that determines if a spooled
file created by a CRTxxx command will be deleted if
a successful create is achieved. *YES is the
default to delete any such spooled files.
Note that specifying *YES will not cause a deletion
of a spooled file where the CRTxxx command failed.
These are always retained. Specifying *YES does not
apply to the LISTING parameter.
*NO may be specified to retain all created spooled
files.
LISTING A *YES/*NO parameter for whether to print a listing.
Summary messages always occur. The default is *NO
which causes individual messages to occur for each
object that was processed.
*YES may be specified to cause a listing with one
line for each object processed.
Restrictions
------------
See the Considerations section.
Prerequisites
-------------
The following TAA Tools must be on your system:
CRTDUPPF Create duplicate physical file
EDTVAR Edit variable
RPLCMD Replace command
RPLDSPF Replace display file
RPLLF Replace logical file
RPLMOD Replace module
RPLPF Replace physical file
RPLPGM Replace program
RPLPRTF Replace printer file
RTVILEMODA Retrieve ILE module attributes
RTVSYSVAL3 Retrieve system value 3
SNDCOMPMSG Send completion message
SNDESCMSG Send escape message
SNDSTSMSG Send status message
WRTDBF Write data base file
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
RPLOBJ *CMD TAAOBKK QATTCMD
TAAOBKKC *PGM CLP TAAOBKKC QATTCL
TAAOBKKC11 *PGM CLP TAAOBKKC11 QATTCL
TAAOBKKC12 *PGM CLP TAAOBKKC12 QATTCL
TAAOBKKC13 *PGM CLP TAAOBKKC13 QATTCL
TAAOBKKC14 *PGM CLP TAAOBKKC14 QATTCL
TAAOBKKC21 *PGM CLP TAAOBKKC21 QATTCL
TAAOBKKC31 *PGM CLP TAAOBKKC31 QATTCL
TAAOBKKR *PGM RPG TAAOBKKR QATTRPG
TAAOBKKR21 *PGM RPG TAAOBKKR21 QATTRPG
TAAOBKKP *FILE PR TAAOBKKP QATTDDS
The TAAOBKKP file is created in QTEMP as TAAWORK to hold the message
text if detail messages are output.
Structure
---------
RPLOBJ Cmd
TAAOBKKC CL pgm
TAAOBKKC11 Cl pgm - Physical files
TAAOBKKC21 CL pgm - Logical files
TAAOBKKR21 RPG pgm - Chains to LF creates
TAAOBKKC31 CL pgm - Display and printer files
TAAOBKKC12 Cl pgm - Commands
TAAOBKKC13 Cl pgm - Modules
TAAOBKKC14 Cl pgm - Programs
TAAOBKKR RPG pgm - Prints listing (called by many pgms)
|