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
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
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
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.
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
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
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
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
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
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
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
ASPDEV Specifies the auxiliary storage pool (ASP) device
name where storage for the library containing the
object is allocated. If the library resides in an
ASP that is not part of the thread's library name
space, this parameter must be specified to ensure
the correct library is searched. If this parameter
is used when the library qualifier specified for the
Object prompt (OBJ parameter) is *CURLIB, *LIBL, or
*USRLIBL, ASPDEV(*) is the only valid value.
This parameter can be specified as a list of two
values (elements) or as a single value. The
possible single values are:
* = The ASPs that are currently part of the thread's
library name space will be searched to locate the
library. This includes the system ASP (ASP 1), all
defined basic user ASPs (ASPs 2-32), and, if the
thread has an ASP group, the primary and secondary
ASPs in the thread's ASP group.
*ALLAVL = All available ASPs will be searched. This
includes the system ASP (ASP 1), all defined basic
user ASPs (ASPs 2-32), and all available primary and
secondary ASPs, (ASPs 33-255) with a status of
*CURASPGRP = If the thread has an ASP group, the
primary and secondary ASPs in the thread's ASP group
will be searched to locate the library. The system
ASP (ASP 1) and defined basic user ASPs (ASPs 2-32)
will not be searched. If no ASP group is associated
with the thread, an error will be issued.
*SYSBAS = The system ASP (ASP 1) and all defined
basic user ASPs (ASPs 2-32) will be searched to
locate the library. No primary or secondary ASPs
will be searched even if the thread has an ASP
Element 1: Device
The device name of the primary or secondary ASP to
be searched. The primary or secondary ASP must have
been activated (by varying on the ASP device) and
have a status of 'Available'. The system ASP (ASP
1) and defined user basic ASPs (ASPs 2-32) will not
Element 2: Search type
*ASP = Specifies that only the single auxiliary
storage pool (ASP) device named in element 1 is to
*ASPGRP = Specifies that the entire group of the
primary auxiliary storage pool (ASP) device named in
element 1 is to be searched.
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
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
QPJOBLOG The number of retention days for QPJOBLOG files.
The default is to use the same value specified for
QPSRVDMP The number of retention days for QPSRVDMP files.
The default is to use the same value specified for
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
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.
The special value *SYSBAS may be entered to bypass
an output queue if it is in the *SYSBAS ASP. This
allows cleanup of output queues in independent ASPs
and bypassing the output queues in the system basic
The special value *ALL may be used if a library is
named to allow bypassing of all output queues in a
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
*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.
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
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