TAA Tools
DLTUSRSPLF      DELETE USER SPOOLED FILES              TAASPOJ

The Delete User Spooled  Files command deletes the spooled  files for a
named user  in one, generic,  or all output  queues.  The  user profile
does  not have to exist which allows  cleanup when the user profile has
been deleted,  but still  is the  owner of  spooled files.   An  action
parameter   determines  whether   the   spooled  file   is  listed   or
listed/deleted.

Because  an API is  used to access  the spooled files  for the specific
user and  output queue(s), the  command runs  without a  lot of  excess
overhead.

You must  have *SPLCTL authority to  specify a user profile  name other
than your own.

A typical command would be:

             DLTUSRSPLF USER(xxx) OUTQ(*ALL/*ALL) ACTION(*DELETE)

All  spooled files  in all output  queues for  the named user  would be
deleted.

DLTUSRSPLF escape messages you can monitor for
----------------------------------------------

      TAA9891    No spooled files exist to be deleted

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

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

   USER          The user  profile name  to delete  spooled files  for.
                 The user profile  does not have to exist  which allows
                 cleanup of  the user profiles where the  user has been
                 deleted, but still is the owner of spooled files.

   OUTQ          The  qualified  name  of the  output  queue  to delete
                 from.    The output  queue  name  may  be  a  specific
                 output queue,  a generic name, or *ALL  for all output
                 queues.

                 The  library  name  defaults  to  *ALL.    A  specific
                 output queue may be named.

   ACTION        The type of action to be performed.

                 *CHECK is the  default which will  print a listing  of
                 the   spooled  files   that   would   be  deleted   if
                 ACTION(*DELETE) had been specified.

                 *DELETE may  be entered to cause  the spooled files to
                 be deleted.

   OUTPUT        How to  output  the results.    * is  the  default  to
                 display the  spooled file  if the  command is  entered
                 interactively.   The spooled file is  deleted after it
                 is displayed.

                 If  the  command  is  entered in  batch  or  *PRINT is
                 specified, the  spooled file is  output and  retained.

                 *NONE  may be  specified to  prevent the  listing from
                 occurring.       *NONE   may    not   be   used   with
                 ACTION(*CHECK).

   DTAARA        A *YES/*NO value  for whether  the DLTUSRSPLF  *DTAARA
                 in  QTEMP will  contain  the number  of spooled  files
                 that   were  found.     The  ACTION   parameter  still
                 determines whether they were deleted or not.

                 *NO is  the  default  meaning the  data  area  is  not
                 created or changed.

                 *YES may be  specified to create  the data area  if it
                 does  not  exist with  attributes  of  *DEC LEN(9  0).
                 CHGDTAARA  is used to  update the count  of the number
                 of spooled files that were found.


Restrictions
------------

You must have  *SPLCTL authority to specify  a user profile name  other
than your own.

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

The following TAA Tools must be on your system:

     CHKGENERC       Check generic name
     CVTDAT          Convert date
     CVTWRKSPLF      Convert WRKSPLF
     EDTVAR          Edit variable
     RSNLSTMSG       Resend last message
     RTVSPCAUT       Retrieve special authority
     RTVSYSVAL3      Retrieve system value 3
     RTVUSRTXT       Retrieve user text
     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
   ------        ----    ---------      ----------    ----------

   DLTUSRSPLF    *CMD                   TAASPOJ       QATTCMD
   TAASPOJC      *PGM       CLP         TAASPOJC      QATTCL
   TAASPOJC2     *PGM       CLP         TAASPOJC2     QATTCL
   TAASPOJR      *PGM       RPG         TAASPOJR      QATTRPG
					

Added to TAA Productivity tools March 21, 2008


Home Page Up to Top