Delete Spooled File (DLTSPLF)
The Delete Spooled File (DLTSPLF) command is used to remove the specified spooled file from the output queue. If the spooled file is currently being produced on a device, it is immediately stopped and removed. Any data that has not been produced is lost.
Keyword |
Description |
Choices |
Notes |
FILE |
Spooled file |
Name, *SELECT |
Required, Positional 1 |
JOB |
Job name |
Single values: * Other values: Qualified job name |
Optional, Positional 2 |
Qualifier 1: Job name |
Name |
Qualifier 2: User |
Name |
Qualifier 3: Number |
000000-999999 |
SPLNBR |
Spooled file number |
1-999999, *ONLY, *LAST, *ANY |
Optional, Positional 3 |
JOBSYSNAME |
Job system name |
Name, *ONLY, *CURRENT, *ANY |
Optional |
CRTDATE |
Spooled file created |
Single values: *ONLY, *LAST Other values: Element list |
Optional |
Element 1: Creation date |
Date |
Element 2: Creation time |
Time, *ONLY, *LAST |
SELECT |
Select files for |
Element list |
Optional |
Element 1: User |
Name, *CURRENT, *ALL |
Element 2: Print device |
Name, *ALL, *OUTQ |
Element 3: Form type |
Character value, *ALL, *STD |
Element 4: User data |
Character value, *ALL |
Element 5: ASP |
1-32, *ALL, *ASPDEV |
ASPDEV |
ASP device |
Name, *, *SYSBAS, *CURASPGRP |
Optional |
Spooled file (FILE)
Specifies the spooled file that is to be removed from the output queue.
This is a required parameter.
- *SELECT
- All spooled files that meet the selection values specified on the Select files for (SELECT) parameter are deleted. This value is mutually exclusive with a value specified on the Job name (JOB) parameter, Spooled file number (SPLNBR) parameter, Job system name (JOBSYSNAME) parameter, or the Spooled file created (CRTDATE) parameter.
- name
- Specify the name of the spooled file that is to be removed from the system.
Job name (JOB)
Specifies the name of the job that produced (or is producing) the spooled file that is removed from the output queue.
Single values
- *
- The job that issued this command produced the spooled file to be deleted.
Qualifier 1: Job name
- name
- Specify the name of the job that produced the file to be deleted.
Qualifier 2: User
- name
- Specify the user name that identifies the user profile under which the job is run.
Qualifier 3: Number
- 000000-999999
- Specify the system-assigned job number of the job that produced the spooled file.
Spooled file number (SPLNBR)
Specifies the number of the job's spooled file that is to be removed from the output queue.
- *ONLY
- Only one spooled file in the job has the specified file name; therefore, the number of the spooled file is not necessary.
- *LAST
- The highest-numbered spooled file created for the job that has the specified file name is the file that is being deleted.
- *ANY
- The spooled file number is not used to determine which spooled file is used. Use this value when the job system name parameter or the spooled file create date and time parameter is to take precedence over the spooled file number when selecting a spooled file.
- spooled-file-number
- Specify the number of the spooled file with the specified file name that is being deleted.
Job system name (JOBSYSNAME)
Specifies the name of the system where the job that created the spooled file (JOB parameter) ran. This parameter is considered after the job name, user name, job number, spooled file name, and spooled file number parameter requirements have been met.
- *ONLY
- There is one spooled file with the specified job name, user name, job number, spooled file name, spooled file number, and spooled file create date and time.
- *CURRENT
- The spooled file created on the current system with the specified job name, user name, job number, spooled file name, spooled file number, and create date and time is used.
- *ANY
- The job system name is not used to determine which spooled file is used. Use this value when the spooled file create date and time parameter is to take precedence over the job system name when selecting a spooled file.
- name
- Specify the name of the system where the job that created the spooled file ran.
Spooled file created (CRTDATE)
Specifies the date and time the spooled file was created. This parameter is considered after the job name, user name, job number, spooled file name, spooled file number, and job system name parameter requirements have been met.
Single values
- *ONLY
- There is one spooled file with the specified job name, user name, job number, spooled file name, spooled file number, and job system name.
- *LAST
- The spooled file with the latest create date and time of the specified job name, user name, job number, spooled file name, spooled file number, and job system name is used.
Element 1: Creation date
- date
- Specify the date the spooled file was created.
Element 2: Creation time
- *ONLY
- There is one spooled file with the specified job name, user name, job number, spooled file name, spooled file number, job system name, and spooled file create date.
- *LAST
- The spooled file with the latest create time of the specified job name, user name, job number, spooled file name, spooled file number, job system name, and spooled file create date is used.
- time
- Specify the time the spooled file was created.
Select files for (SELECT)
Specifies which group of files should be selected for deletion. Positional values can be specified to select the files: the user that created the file, the device that the file is queued for, the form type specified, the user data tag associated with the file, or the auxiliary storage pool the file is in. Only files that meet each of the values are selected.
Element 1: User
- *CURRENT
- Only files created by the user running this command are selected.
- *ALL
- Files created by all users are selected.
- name
- Specify a user name. Only files created by that user name are selected.
Element 2: Print device
- *ALL
- Files on any device-created or user-created output queue are selected.
- *OUTQ
- All files on any user-created output queue are selected. A user-created output queue is any output queue that is not automatically created by a device. A user-created output queue does not generally have the same name as a device, but if it does, it does not reside in library QUSRSYS.
- name
- Specify a device name. Only files on the device created output queue for that device are selected. A device created output queue is one that has the same name as a device and resides in the QUSRSYS library. Unless it already exists, it will automatically be created by the system when the device is created. A device created output queue cannot be deleted.
Element 3: Form type
- *ALL
- Files for all form types are selected.
- *STD
- Only files that specify the standard form type are selected.
- form-type
- Specify the form type to select the file.
Element 4: User data
- *ALL
- Files with any user data tag specified are selected.
- user-data
- Specify the user data tag to select the file.
Element 5: ASP
- *ALL
- All files as specified in the Auxiliary Storage Pool Device (ASPDEV) parameter are selected.
- *ASPDEV
- Files specified in the Auxiliary Storage Pool Device (ASPDEV) parameter are selected.
- 1-32
- Specify the auxiliary storage pool (ASP) of the files being selected.
ASP device (ASPDEV)
Specifies the auxiliary storage pool device name from which spooled files are to be selected. This parameter is only valid if the ASP number (ASP) element of the Select parameter is *ALL or *ASPDEV.
- *
- Files which are found in the ASPs that are currently part of the thread's library name space are selected. 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.
- *SYSBAS
- Files which are found in the system ASP (ASP 1) and all defined basic user ASPs (ASPs 2-32) are selected.
- *CURASPGRP
- Files which are found in the primary and secondary ASPs in the thread's ASP group are selected. If no ASP group is associated with the thread, an error will be issued.
- name
- Specify the name of the auxiliary storage pool device description. Files which are found in the specified primary or secondary ASP are selected. Only primary or secondary ASPs which are in the thread's ASP group may be specified. If no ASP group is associated with the thread, an error will be issued.
DLTSPLF FILE(WEEKLY) JOB(000146/SMITH/PAYROLL5)
This command deletes the spooled file named WEEKLY (of job PAYROLL5, for user SMITH, job number 000146) from the output queue. Spooled files with different names produced by the job named PAYROLL5 are not affected by this command. If the job produced more than one file named WEEKLY, no file is deleted because SPLNBR(*ONLY) is assumed.
*ESCAPE Messages
- CPF337E
- ASP device &1 not in current ASP group for thread.
- CPF337F
- ASP device &1 not allowed with ASP number &2.
- CPF33D0
- Printer &1 does not exist.
- CPF33D1
- User &1 does not exist.
- CPF3303
- File &1 not found in job &5/&4/&3.
- CPF3309
- No files named &1 are active.
- CPF3330
- Necessary resource not available.
- CPF3340
- More than one file with specified name found in job &5/&4/&3.
- CPF3342
- Job &5/&4/&3 not found.
- CPF3343
- Duplicate job names found.
- CPF3344
- File &1 number &8 no longer in the system.
- CPF34A4
- File &1 number &8 not held or deleted.
- CPF3478
- File &1 not found in job &5/&4/&3 on output queue &6 in library &7.
- CPF3492
- Not authorized to spooled file.
- CPF8128
- &8 damage on output queue &4 in library &9.
- CPF9825
- Not authorized to device &1.
- CPF9833
- *CURASPGRP or *ASPGRPPRI specified and thread has no ASP group.
- CPFB8ED
- Device description &1 not correct for operation.