The Print Last Use (PRTLSTUSE) command prints a list of objects that have not been used within a specified number of days. This command can be used to analyze objects on your system to determine if they are needed.
Two report types are available: an object report where all objects in a library are listed and a member report where only data and source file members are listed. The report can be sorted by object name within object type or by last usage date. The printed information includes the name and type of object, the last usage date, and the usage count. This is a long running command, so run it in batch.
Required Parameters
LIB
Specify the library or libraries containing objects you want to analyze with the following possible values:
*LIBL: All libraries in the library list are used.
*USRLIBL: Libraries in the user portion of the library list are used.
*CURLIB: The current library is used.
*ALLUSR: All user libraries are used.
library-name: Specify the name of the library to use.
Optional Parameters
OMITDAYS
This parameter allows you to avoid seeing objects that have recently been used. For example, if you specify 30 days, objects that have been used within the past 30 days will not be included. If a value is specified for this parameter, *NONE must be specified for the OMITDAYSA parameter.
*NONE: All objects within the library are included in the report.
number-of-days: Specify the number of days since the last usage. Valid values range from 0 to 9999.
OMITDAYSA
This parameter allows you to see only objects that have recently been used. For example, if you specify 30 days and the object has not been used within the past 30 days, it will not be included on the report. If a value is specified for this parameter, *NONE must be specified for the OMITDAYS parameter.
*NONE: All objects within the library are included in the report.
number-of-days: Specify the number of days since the last usage. Valid values range from 0 to 9999.
TYPE
Specify the type of report to produce.
*OBJ: Each object in the specified library is considered. File members are not considered.
*MBR: Only members of files in the specified library are considered. You can specify whether source files are included or omitted from consideration with the SRCFILES parameter.
SEQUENCE
Specify whether the report should be printed in object name within object type order or in last used date order.
*NO: The report is printed in object name within object type order.
*YES: The report is printed in last used date order. Objects that have never been used (the last used date is blank) are printed first.
SRCFILES
If TYPE(*MBR) is specified, specify whether or not source files should be considered.
*INCLUDE: Source files are included. Members in source files, in addition to members in database files, are considered.
*OMIT: Source files are not considered.
*ONLY: Only source files are considered. Database files are not considered.
PRTFILE
Specify the qualified name of the printer file that is to be used to print the listing.
The possible library values are
*LIBL: The library list is used to locate the printer file. library-name: Specify the name of the library where the printer file is located.
The possible printer file name values are
QPRINT: Printer file QPRINT is used.
printer-file-name: Specify the name of the printer file.
Example
PRTLSTUSE LIB(MYLIB) OMITDAYS(30)
This command analyzes all objects in library MYLIB. Objects that have been used within the past 30 days are not included on the printed report.
Prerequisite
The following QUSRTOOL must reside on your system before you can create the PRTLSTUSE tool.
ADDDAT Add date
Source Members
INFO: PRTLSTUSE (QATTINFO) CDO: TAAOBJE (QATTCMD) CLP: TAAOBJEC (QATTCL) RPG: TAAOBJER (QATTRPG)
Robin Klima is a senior technical editor for Midrange Computing.
This tool is documented in Midrange Computing's QUSRTOOL Command Reference. The manual contains explanations and syntax diagrams for more than 300 useful tools.
LATEST COMMENTS
MC Press Online