The Check Program Source command operates against the program and
module objects in a library or the special library values *USRLIBL or
*ALLUSR. It is designed to do the following:
** Determines if the source still exists in the same library,
file, and member used to create the program or module. If
not, the object is flagged.
** If the source exists, CHKPGMSRC determines if the object is
'down level'. This means that the source has been changed
more recently than the create date of the object. The check
is made by reading the source statements and determining the
most current date of any statement.
** Offers a replace option if the object is 'down level'. This
re-creates the program or module object.
** An ILE program is checked for the number of modules in the
program. If a single module exists, the program is handled
normally and can be re-created if 'down level'.
** If a multiple module ILE program exists, the source change
dates for each module are checked and will be flagged if 'down
level'.
A typical command would be entered as:
CHKPGMSRC LIB(xxx)
A spooled file is output with the information. By default, only the
exceptions are listed. CHKPGMSRC is a slow running command and
should be submitted to batch.
If *USRLIBL or *ALLUSR is specified, the TAATOOL library is
automatically omitted.
*SRVPGM object types are not supported.
More details
------------
The program and module objects are found in the library specified and
a check is made to see if the member still exists which was used to
create the object. If it does, the source statements are read and
the most current change date from any of the source statements is
used to compare against the object create date. If the most current
source statement date is greater than the create date, the object is
considered 'down level' and is flagged.
Using the most current source statement change date is generally more
accurate than the member level change date. The member level change
date can be changed by a variety of commands such as RST, MOVOBJ,
CPYSRCF, etc. The source change dates tend only to be changed by
SEU. If no SEU changes occur, the source change dates normally
remain the same regardless of what happens to the member or file.
See the later section on exceptions.
An option exists to re-create the programs and modules that are 'down
level' by using the TAA Tools RPLPGM and RPLMOD. RPLPGM does a good
job of replacing OPM programs by retrieving the current attributes of
the program as described by DSPPGM and using them to re-create the
program. Both the CRT command parameters and the CHGPGM parameters
are considered.
The system does not provide the same level of information about ILE
programs or modules so the replace function can only the assume the
defaults for the create commands.
There is an additional 'down level' check that is made. This helps
determine if the source was changed on the same day as the object was
created, but at a later point in the day. The check is performed as
follows:
If the most current source statement change date is equal to
the object create date, the member level change date is also
compared to see if it is the same day.
If so, the member level change time is compared against the
object create time and if the member time is greater, the
object is also flagged as 'down level'.
If the command is executed interactively, status messages are sent
describing the progress.
The command is year 2000 ready.
Exceptions to 'Down Level' indication
-------------------------------------
The check for a 'down level' condition will not always make the
proper determination.
** If the source is changed on the same day as the object is
created, but after the create command executes, the previously
described checking would flag the program as down level.
However, if on a subsequent day, one of the commands was run
that changed the member level change date, the CHKPGMSRC
command cannot determine at that point if the source is really
'down level'.
** CHKPGMSRC uses the change dates found on each source
statement. Normally, these dates are only changed by SEU.
However, it is possible to change the dates with a program and
prevent CHKPGMSRC from making the proper decision.
** If one or more statements are deleted and none are added or
changed, CHKPGMSRC will not flag the member.
Command parameters *CMD
------------------
LIB The library to be checked. The special values
*CURLIB, *USRLIBL, or *ALLUSR may be specified. You
must be authorized to the TAADSPADP authorization
list to specify *ALLUSR.
All *PGM object types (OPM and ILE) will be checked
along with *MODULE object types. *SRVPGM object
types are not checked.
PRTEXP A *YES/*NO value that defaults to *YES which causes
only the exceptions to be listed. A DFU program
(never has source) is not considered as an
exception.
*NO may be specified to print one line per program
or module found.
RPLPGM A *YES/*NO value that defaults to *NO which does not
replace an existing program or module.
*YES may be specified which causes a replace of an
existing program or module if the source exists and
the object is flagged as 'down level'. The TAA
Tools RPLPGM and RPLMOD are used to replace the
objects. RPLPGM captures the existing attributes of
OPM programs and then specifies the attributes on
the CRT command and also a CHGPGM command (if
needed).
Single module ILE programs and module objects are
re-created using the command defaults.
DLTSPLF A *YES/*NO value that defaults to *YES which causes
the compile spooled file to be deleted if RPLPGM or
RPLMOD is used and is successful. If the object
does not create, it is flagged in the spooled output
and the compilation listing remains.
*NO causes any compilation listings to be retained.
OMITLIB A list of up to 40 libraries may be entered which
will prevent any output from the named libraries.
TAATOOL and TAASECURE are automatically omitted for
*USRLIBL or *ALLUSR. The default is *NONE.
*NONE must be specified if the LIB parameter names a
specific library or *CURLIB.
SRCFILE The name of the source file to be used. The default
is *OBJ meaning to use the source file name and
library as found in the object description.
A specific source file name and library may be
entered in which case the name entered will be used
to determine if the source exists and to re-create
from if needed. This parameter is intended for the
case where the source member used for the create is
not where the member currently exists.
See also the PGMATR parameter. Note that only one
source file name may be specified. For example,
assume library LIBA source files (QCLSRC, QRPGSRC
...) were used when the objects were created. The
source now resides in the same source file names in
library LIBB. Multiple CHKPGMSRC commands would be
required to check all of the program objects. Each
use of CHKPGMSRC would specify a different source
file and program attribute.
PGMATR The program attribute to be considered if a source
file name is entered for the SRCFILE parameter. The
default is *ALL meaning all program attributes are
considered. *ALL must be used when SRCFILE(*OBJ) is
specified.
Naming a PGMATR (such as RPG or CLP) should be
considered if the source resides in a different file
than where the object was created from and multiple
source files were used for the create. See the
discussion with the SRCFILE parameter.
Restrictions
------------
If RPLPGM(*YES) is specified, you must be authorized to replace the
program or module.
See the previous discussion on exceptions to the 'down level'
indication.
See the previous discussion about ILE programs and modules. *SRVPGM
object types are not supported.
Prerequisites
-------------
The following TAA Tools must be on your system:
CHKJOBCTL Check job control
DSPOBJD3 Display object description 3
EXPVAL Expand value
EXTLST2 Extract list 2
RPLMOD Replace module
RPLPGM Replace program
RTVILEMODA Retrieve ILE module attributes
RTVLSTCHG Retrieve last change
SNDCOMPMSG Send completion message
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
------ ---- --------- ---------- ----------
CHKPGMSRC *CMD TAASRDH QATTCMD
TAASRDHC *PGM CLP TAASRDHC QATTCL
TAASRDHR *PGM RPG TAASRDHR QATTRPG
|