DLTOLDOBJ DELETE OLD OBJECT TAAOBMJ |
The Delete Old Object command deletes old objects in a library based
on the create date of the objects and the number of days specified.
If your approach is to create temporary objects in a permanent
library and cleanup periodically based on the create date, DLTOLDOBJ
may be useful. The default is to 'check' meaning only a listing is
produced of what would be deleted.
A typical command would be:
DLTOLDOBJ LIB(ABC) CRTDAYS(100)
Because the default for the ACTION parameter is *CHECK, all objects
in library ABC that were created over 100 days ago would be listed
(none would be deleted). This allow a review of what would be
deleted. To delete the same objects, you would specify:
DLTOLDOBJ LIB(ABC) CRTDAYS(100) ACTION(*DELETE)
DLTOLDOBJ escape messages you can monitor for
---------------------------------------------
TAA9891 Not all objects deleted (if OUTPUT = *PRINT)
Escape messages from based on functions will be re-sent.
DLTOLDOBJ Command parameters *CMD
----------------------------
LIB The library where the objects exist.
CRTDAYS The number of days since an object was created to be
considered for deletion. It must be in a range of 0
to 80000.
OBJ The name or generic name of objects to be considered
for deletion. *ALL is the default for all objects.
OBJTYPE The object type of the objects to be considered for
deletion. *ALL is the default. Use the prompter to
see the supported values.
ACTION The action to be taken.
*CHECK is the default to list the objects that would
be deleted if *DELETE was specified.
*DELETE may be specified to cause objects meeting
the criteria to be listed and deleted.
OUTPUT How to output the results. * is the default to
display the spooled file if the command is entered
interactively. If the display is ended with F3/F12
or the Enter key, the spooled file is deleted after
it is displayed. To retain the spooled file, you
may use the the System Request 'Cancel' function and
the spooled file will exist in a HLD status.
If the command is entered in batch or *PRINT is
specified, the spooled file is output and retained.
Restrictions
------------
The objects are attempted to be deleted in the order in which they
are read which is the same order as displayed by DSPLIB. Because of
the order, some physical files may not be deleted because a dependent
logical file has a name that comes after the physical file. A second
use of the command will delete the physical.
Prerequisites
-------------
The following TAA Tools must be on your system:
ADDDAT Add date
CVTOBJD4 Convert object description 4
EDTVAR Edit variable
RSNLSTMSG Resend last message
RTVSYSVAL3 Retrieve system value 3
SNDCOMPMSG Send completion message
SNDESCINF Send escape information
SNDESCMSG Send escape message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
DLTOLDOBJ *CMD TAAOBMJ QATTCMD
TAAOBMJC *PGM CLP TAAOBMJC QATTCL
TAAOBMJR *PGM RPG TAAOBMJR QATTRPG
|
Added to TAA Productivity tools July 15, 2013