Command reference / spool
DLTSPLF
Delete Spooled File
Removes the specified spooled file from an output queue. If the file is being produced on a device, it is stopped immediately and removed, and any data not yet produced is lost. The SYSTOOLS.DELETE_OLD_SPOOLED_FILES procedure performs a similar function.
Allowed environments: *ALL.
Positional parameters: 3.
Parameters
FILE
Spooled file
Names the spooled file to remove from the output queue. This parameter is required.
Suggested / special values:
*SELECT
*SELECT- Deletes all spooled files that match the selection values in the SELECT parameter. Cannot be combined with the JOB, SPLNBR, JOBSYSNAME, or CRTDATE parameters.
JOB
Job name
Identifies the job that produced, or is producing, the spooled file to remove.
Suggested / special values:
*
*- The job that issued this command produced the spooled file to delete.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Job name
Job name
User
User
Number
Number
SPLNBR
Spooled file number
Gives the number of the job's spooled file to remove when more than one file has the same name.
Suggested / special values:
*ONLY, *LAST, *ANY
*ONLY- Only one spooled file in the job has the given name, so no number is needed.
*LAST- The highest-numbered spooled file created by the job with the given name is deleted.
*ANY- The file number is not used to select the file. Use this when the JOBSYSNAME or CRTDATE parameter should take precedence.
JOBSYSNAME
Job system name
Names the system where the job that created the spooled file ran. This is checked after the job name, user name, job number, file name, and spooled file number requirements are met.
Suggested / special values:
*ONLY, *CURRENT, *ANY
*ONLY- Exactly one spooled file matches the job name, user name, job number, file name, spooled file number, and create date and time.
*CURRENT- Uses the spooled file created on the current system that matches the job name, user name, job number, file name, spooled file number, and create date and time.
*ANY- The job system name is not used to select the file. Use this when the CRTDATE parameter should take precedence.
CRTDATE
Spooled file created
Gives the date and time the spooled file was created. This is checked after the job, file name, spooled file number, and job system name requirements are met.
Suggested / special values:
*ONLY, *LAST
*ONLY- Exactly one spooled file matches the job name, user name, job number, file name, spooled file number, and job system name.
*LAST- Uses the matching spooled file with the latest create date and time.
Elements in order
Creation date
Creation date
Creation time
Creation time
Suggested / special values:
*ONLY, *LAST
SELECT
Select files for
Chooses the group of files eligible for deletion using positional elements: creating user, print device or output queue, form type, user data tag, and ASP. A file must meet every specified element to be selected.
*CURRENT- Only files created by the user running this command are selected.
*ALL- Applies to each element: files from all users, files on any device-created or user-created output queue, files of all form types, files with any user data tag, or, for the ASP element, all files as specified by ASPDEV.
*OUTQ- All files on any user-created output queue are selected.
*STD- Only files with the standard form type are selected.
*ASPDEV- Files in the ASP specified by the ASPDEV parameter are selected.
Elements in order
User
User
Suggested / special values:
*CURRENT, *ALL
Print device
Print device
Suggested / special values:
*ALL, *OUTQ
Form type
Form type
Suggested / special values:
*ALL, *STD
User data
User data
Suggested / special values:
*ALL
ASP
ASP
Suggested / special values:
*ALL, *ASPDEV
ASPDEV
ASP device
Names the auxiliary storage pool device from which spooled files are selected. Valid only when the ASP element of SELECT is *ALL or *ASPDEV.
Suggested / special values:
*, *SYSBAS, *CURASPGRP
*- Files in the ASPs currently part of the thread's library name space: system ASP 1, basic user ASPs 2-32, and the primary and secondary ASPs of the thread's ASP group if it has one.
*SYSBAS- Files in system ASP 1 and basic user ASPs 2-32.
*CURASPGRP- Files in the primary and secondary ASPs of the thread's ASP group. An error is issued if the thread has no ASP group.
Examples
DLTSPLF FILE(WEEKLY) JOB(000146/SMITH/PAYROLL5)
Deletes spooled file WEEKLY from job PAYROLL5 (user SMITH, job number 000146) on the output queue. Spooled files with other names from that job are not affected. If the job produced more than one file named WEEKLY, none is deleted because SPLNBR(*ONLY) is assumed.
Generated from os/cl/catalog/DLTSPLF.json and os/cl/help/DLTSPLF.json.