TAA Tools
DLTLSTUSE       DELETE LAST USE                        TAAOBMK

The Delete  Last Used  command deletes  objects in a  library based  on
the  last used date  and the number  of days  specified.  If  an object
has  never  been used,  the  create date  is  used instead.   DLTLSTUSE
provides a cleanup when objects are no longer being used.

The default  for ACTION is  *CHECK, meaning  the listing will  describe
the objects that would be deleted if ACTION(*DELETE) was specified.

The system  does not update the last  used date until the  object is no
longer active.   For example, if you have  a program that was last used
12 months  ago,  but is  now  active, you  would  cause a  deletion  if
USEDAYS is less than 12 365 days.

A typical command would be:

             DLTLSTUSE   LIB(ABC) USEDAYS(500)

Because the  default for  the ACTION parameter  is *CHECK,  all objects
in library  ABC that have not  been used in the last  500 days would be
listed (none would be deleted).  This  allow a review of what would  be
deleted.  To delete the same objects, you would specify:

             DLTLSTUSE   LIB(ABC) USEDAYS(100) ACTION(*DELETE)

DLTLSTUSE escape messages you can monitor for
---------------------------------------------

      TAA9891    Not all objects deleted (if OUTPUT = *PRINT)

Escape messages from based on functions will be re-sent.

DLTLSTUSE Command parameters                          *CMD
----------------------------

   LIB           The library where the objects exist.

   USEDAYS       The number of  days since an  object was last  used to
                 be  considered for deletion.   It  must be in  a range
                 of  0 to 8000.  If an  object has never been used, the
                 create date is used instead.

   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.

The system  does not update the  last used date until the  object is no
longer active.

Prerequisites
-------------

The following TAA Tools must be on your system:

     ADDDAT          Add date
     CVTOBJD4        Convert object description 4
     DLTOBJ2         Delete object 2
     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
   ------        ----    ---------      ----------    ----------

   DLTLSTUSE     *CMD                   TAAOBMK       QATTCMD
   TAAOBMKC      *PGM       CLP         TAAOBMKC      QATTCL
   TAAOBMKR      *PGM       RPG         TAAOBMKR      QATTRPG
					

Added to TAA Productivity tools July 15, 2012


Home Page Up to Top