DLTOLDSPLF      DELETE OLD SPOOLED FILES               TAASPLL

 The Delete  Old  Spooled files  command is  designed to  allow a  house
 cleaning of  old spooled files.   A retention  date is named.   You can
 either  have the  old spooled  files deleted  or have  them moved  to a
 specified queue.   Moving  the old spooled  files to  a separate  queue
 allows you to review them and then delete them manually.

 A typical command would be entered as:

         DLTOLDSPLF   OUTQ(*ALL) RETAINDAYS(14)

 This would  cause all spooled files  on the system that  are older than
 14 days to be deleted.

 The  retention date may be  either the create date  of the spooled file
 or the  last time  it was  used such  as by  a display  of the  spooled
 file.

 DLTOLDSPLF  must  use  several   slow  running  internal  commands  and
 therefore should be submitted to batch.

 Command parameters  to allow a specific output queue  to be named.  The
 default is to delete spooled files for all  users.  A list of up to  40
 users may  be specified.   This  allows specific cleanup  of an  output
 queue  such  as QEZJOBLOG  where  many system  user  profile names  are
 used.

 Separate  command parameters exist to  allow a different retention date
 for QPJOBLOG and QPSRVDMP files.   A single output queue or  all output
 queues  may be specified.   You  may also  specify that  certain output
 queues be bypassed (no files in the queue are considered).

 Separate  parameters exist to  allow you to  delete a  specific user, a
 specific spooled  name  (can  be  generic), a  specific  form  type,  a
 specific string of user  data, or based on a status of  Held, Saved, or
 Ready.   A  spooled  file must  meet all  selection data  before  it is
 deleted.

 A printed  output report  occurs  to the  spooled file  named  SPLFILES
 describing each output queue,  the number of spooled files  which exist
 and the number which were deleted/moved.

 Only spooled  files in the RDY, CLO, HLD  or SAV status are considered.
 All   other  status   indications  are  considered   ineligible  to  be
 deleted/moved.  The ineligible files are described in the report.

 Security considerations
 -----------------------

 The  user  of  DLTOLDSPLF  must  be  authorized  to  the  output  queue
 specified.  If  he is not the owner  of all of the spooled  files to be
 operated  on, he must have  *JOBCTL special authority.   *JOBCTL may be
 adopted by either program or group profile adoption.

 If OUTQ(*ALL) is  specified, the user must  have *ALLOBJ, *JOBCTL,  and
 *SPLCTL special  authorities.  The  special authorities may  be adopted
 by either program or group profile adoption.

 Contrast with the SPLARC tool
 -----------------------------

 The  TAA  Tool  SPLARC  is  similar  to  DLTOLDSPLF.    SPLARC  is  the
 replacement of the SPLCTL tool.

 Both SPLARC and DLTOLDSPLF perform a  cleanup function.  SPLARC has  an
 advantage in  that it will  save spooled files  and allow a  convenient
 means  of identifying  what was  saved and  how  to reprint.   However,
 SPLARC  has a disadvantage in that each  output queue to be worked with
 must be  entered into a  control file.   SPLARC  also has an  advantage
 that different  retention and save characteristics can  be specified by
 output queue.

 DLTOLDSPLF  has an  advantage that  it is  simple and  operates against
 all queues without the use of any control files.

 It is possible  to combine the  use of SPLARC  with DLTOLDSPLF.   Those
 output  queues that  need a  re-print capability  should be  controlled
 with  SPLARC.  DLTOLDSPLF  should be used  for all other  output queues
 and the  LIST parameter  should exclude  those output  queues that  are
 controlled by SPLARC.

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

    OUTQ          The qualified name of  the OUTQ to be checked  for old
                  spooled  files.   *ALL causes  a  check on  all output
                  queues.    When a  specific  queue is  named,  a blank
                  entry  in the  library  portion  of  the  name  causes
                  *LIBL to be used.

                  A specific  library qualifier  may be named  or *LIBL,
                  *USRLIBL, *CURLIB, *ALL, or *ALLUSR.

                  See also the LIST parameter.

    FILE          The  name  of the  spooled file  to  be deleted.   The
                  default is *ALL.   A specific name  or a generic  name
                  may be entered.

    USER          The  user  (owner  of  the  spooled  file)  to  delete
                  spooled  files  for.   The  default  is  *ALL for  all
                  users.

                  A list of  up to  40 specific users  or generic  users
                  may be named.

    EXCLUDEUSR    The user  (owner of the  spooled file) to  be excluded
                  so that  his spooled files  will not be  deleted.  The
                  default  is *NONE  meaning all  spooled files  will be
                  considered.

                  Up to 300 names or generic names may be specified.

    JOB           The job name  to be deleted.   The default is *ALL  to
                  mean   all  jobs   are   included   in  the   deletion
                  considerations.   A specific  job name  may be entered
                  to allow  you  to  delete  the  spooled  files  for  a
                  specific job.

    EXCLUDEJOB    The  job  name(s) to  be  excluded.   The  default  is
                  *NONE  meaning  that no  exclusions exist.    All jobs
                  will be considered for deletion.

                  A list of up to 300  jobs or generic job names may  be
                  entered  that will  be excluded  from  deletion.   Any
                  spooled   files  for  the   specified  jobs   will  be
                  retained.

    FORMTYPE      The  form type  to be deleted.   The  default is *ALL.
                  A specific  form type may  be entered  or the  special
                  value  *STD.   The value  *STD is  the default  when a
                  spooled file is output.

    USRDTA        The user data to be deleted.  The default is *ALL.

                  A  name may be entered  such as ABC  or a generic name
                  such as ABC*.

                  A string  may also  be  entered which  is not  a  name
                  such as 'ABC(' 'ABC D', 'abcd', 'abc d' etc.

    STS           The status  of the  spooled file to  be deleted.   The
                  default  is  *ALL.   Only  those  spooled  files in  a
                  status of RDY,  CLO, HLD,  or SAV are  eligible to  be
                  deleted.

                  A  specific  status  of  RDY,  HLD,   or  SAV  may  be
                  specified  to  be  deleted.    If  a  specific  status
                  condition  is specified,  all other  status conditions
                  are bypassed.

    RETAINDAYS    The number  of  retention days.    The default  is  14
                  meaning  the  spooled  files  would  be  kept  on  the
                  system  for 14 days.   If DLTOLDSPLF is  run every day
                  with RETAINDAYS(1) specified,  a spooled file  created
                  today would  not be  deleted until  tomorrow.  A  zero
                  is a  valid entry to delete  any spooled files created
                  today.

                  The default is  to determine the  retention days  from
                  the date the spooled  file was created.  The  'date of
                  last  use' may also  be specified.   See  the COMPDATE
                  parameter.

    QPJOBLOG      The  number  of  retention  days  for  QPJOBLOG files.
                  The default  is to use  the same  value specified  for
                  RETAINDAYS.

    QPSRVDMP      The  number  of  retention  days for  QPSRVDMP  files.
                  The  default is  to use  the same value  specified for
                  RETAINDAYS.

    MOVTOOUTQ     The qualified name  of the  output queue  to be  moved
                  to.   The library defaults to  *LIBL.  The  default is
                  *NONE  meaning the old  spooled files  will be deleted
                  and not moved.  If an  output queue is named, the  old
                  spooled files  will be moved  to the  specified queue.

                  The intent  of this parameter is that  you may want to
                  review  the spooled files that  are past the retention
                  date before  deleting  them.   The  spooled files  are
                  moved  to  the  named  queue.    After  reviewing  the
                  contents,   the   spooled  files   must   be  manually
                  deleted.

                  If this  entry  is  specified,  any  existing  spooled
                  files on the 'move to queue' are ignored.

    LIST          A list  of output queues  or generic output  queues to
                  be bypassed.   This allows you  to have certain output
                  queues  where  the  spooled  files  will  be  retained
                  indefinitely  or  you may  have  a  production  output
                  queue   (e.g.     PRT01),  that   is   always  handled
                  manually.    The  output queue  entry  is  a qualified
                  name.  Up to 90 output queues may be named.

                  If the library  name is blank,  the output queue  must
                  exist on the library list.

                  The  output  listing  produced  will  described  those
                  output queues which have been explicitly bypassed.

    ACTION        The  action to be  performed.  *DELETE  is the default
                  which will cause spooled files  to be deleted if  past
                  the  retention date  or  moved if  you have  specified
                  the MOVTOOUTQ parameter.

                  *CHECK may  be specified to cause  a summary report of
                  what  would  happen  if  *DELETE  is  specified.    No
                  spooled  files  will  be  deleted.     The  number  of
                  spooled  files that  would be  deleted and  the amount
                  of  space that would  be reclaimed are  shown.  *CHECK
                  may  only  be  specified  when   MOVTOOUTQ(*NONE)  and
                  SUMMARY(*YES) are specified.

    COMPDATE      The  date to be  compared for  retention.   *CRTDAT is
                  the  default  meaning the  date the  spooled  file was
                  created.

                  *LSTUSE may be  specified to  mean the  last time  the
                  spooled file was  used.  The initial date  is the date
                  the  spooled file  was created.   The date  is changed
                  if the  spooled file  is displayed,  copied,  printed,
                  sent, or when the attributes are changed.

    SUMMARY       A *YES/*NO  value for whether  a summary  spooled file
                  should  be output.   *YES  is the  default.   To route
                  this   file   to  a   different  queue,   use  OVRPRTF
                  FILE(TAAPRT1) and specify the OUTQ parameter.

                  If *NO is specified  and no errors occur, the  spooled
                  file is output and then deleted.

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

 The following TAA Tools must be on your system:

      ADDDAT       Add date
      CHKJOBCTL    Check job control
      CVTALLOUTQ   Convert all output queues
      CVTOUTQ      Convert output queue
      EDTVAR       Edit variable
      EXTLST       Extract list
      EXTLST2      Extract list 2
      SNDCOMPMSG   Send completion message
      SNDESCMSG    Send escape message

 Implementation
 --------------

 None, the tool is ready to use.

 Objects used by the tool
 ------------------------

    Object        Type        Attribute      Src member    Src file
    ------        ----        ---------      ----------    ----------

    DLTOLDSPLF    *CMD                       TAASPLL       QATTCMD
    TAASPLLC      *PGM           CLP         TAASPLLC      QATTCL
    TAASPLLC2     *PGM           CLP         TAASPLLC2     QATTCL
    TAASPLLR      *PGM           RPG         TAASPLLR      QATTRPG

Added to TAA Productivity Tools April 1, 1995


Home Page

Powered by AS/400Powered by AS/400 Last modified on October 10, 2008 © 1995, 2008 - Jim Sloan, Inc.