The Print Last Changed command prints a listing of the objects that
have not been changed for a specified number of days. It is useful
for understanding how your system is being changed.
A typical command is entered as:
PRTLSTCHG LIB(xxxxx) OMITDAYS(100)
This prints a listing of all objects in the specified library that
have not been changed in the last 100 days. You can also request
only those objects that have been changed in the last N days.
Various options exist for sorting and selection.
If a data base file is shown with TYPE(*OBJ), the change date
reflects the last time the object level information was changed.
This includes such changes as caused by CHGPFM, adding or removing a
member, etc. Changes to the data are not recorded in the object
level information, but rather in the member level information.
Member level information is updated when the file is opened for
update and then closed. It is also changed by grant and revoke
operations. To understand when the data was last changed, specify
The usage count is also shown. The usage count can be misleading for
multi-member files such as source files. The system does not keep
track at an object level, but rather at a member level. When object
level information is shown, the usage count is the sum of the member
usage counts. To see the member level information, specify
For source files, the system keeps two last change dates. The date
used to reflect the last SEU change is not shown. Instead, the
normal member change date is used.
PRTLSTCHG is a slow running command and should be submitted to batch.
There are companion commands PRTUSECNT, PRTLSTUSE, and PRTCRTDAT that
allow operations by the usage count value, last used date and create
Command parameters *CMD
LIB A single library may be specified or the special
values *LIBL, *USRLIBL, *CURLIB or *ALLUSR.
OMITDAYS The number of days you want to omit before the
object was changed. The default is *NONE. If you
specify 100 and the object has been changed in the
last 100 days, it will not appear in the report.
This is the 'omit before' date. It allows you to
avoid seeing any objects that have recently been
OMITDAYSA The number of days you want to omit after the object
was changed. The default is *NONE. If you specify
100 and the object was last changed over 100 days
ago, it will not appear in the report. This is the
'omit after' date. It allows you to see only those
that have recently changed.
Both OMITDAYS and OMITDAYSA cannot be specified on
the same use of PRTLSTCHG.
TYPE The type of report *OBJ or *MBR. TYPE(*OBJ) is the
default and shows each object and it's change date.
Members are not considered. See the previous
comments on the use of this parameter with data base
TYPE(*MBR) shows only members which have been
changed. See also the SRCFILES parameter to
determine if you want source files or data files
SEQUENCE A *YES/*NO value with *NO as the default which means
the objects will appear name within type. If *YES
is specified, the objects will appear with the
oldest last changed date first.
SRCFILES Whether source files should be included or not. The
default is *INCLUDE. The other values of *OMIT and
*ONLY can only be specified when TYPE(*MBR) is used.
*OMIT should be specified when you want to include
data files and exclude source files.
*ONLY should be specified when you want to include
source files and exclude data files.
PRTFILE The qualified name of the printer file to be used.
The default is QPRINT in *LIBL. The spooled file
name is the name of the LIB parameter.
The following TAA Tools must be on your system:
ADDDAT Add date
RTVSYSVAL3 Retrieve system value 3
SNDCOMPMSG Send completion message
SNDESCMSG Send escape message
SNDSTSMSG Send status message
None, the tool is ready to use.
Objects used by the tool
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
PRTLSTCHG *CMD TAAOBJI QATTCMD
TAAOBJIC *PGM CLP TAAOBJIC QATTCL
TAAOBJIR *PGM RPG TAAOBJIR QATTRPG