Delete Expired Spooled files (DLTEXPSPLF)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Delete Expired Spooled Files (DLTEXPSPLF) command removes expired spooled files on the system or the auxiliary storage pool (ASP) group specified by the user. A spooled file expires at 23:59:59, system local time on the date specified in the Expiration date for file (EXPDATE) spooled file attribute. To automate the removal of expired spooled files, you can create a job schedule entry that runs the DLTEXPSPLF command once a day. See the Examples section for an example using the Add Job Schedule Entry (ADDJOBSCDE) command.

Restriction:

Top

Parameters

Keyword Description Choices Notes
ASPGRP ASP group Name, *ALL, *SYSBAS Optional, Positional 1
Top

ASP group (ASPGRP)

Specifies the auxiliary storage pool (ASP) group from which expired spooled files are to be removed.

*ALL
Expired spooled files which are found in the system ASP (ASP 1), all defined basic user ASPs (ASPs 2-32) and all primary and secondary ASPs are deleted.
*SYSBAS
Expired spooled files which are found in the system ASP (ASP 1) and all defined basic user ASPs (ASPs 2-32) are deleted.
name
Specify the name of a primary ASP group. Expired spooled files which are found in the primary and secondary ASPs of the specified ASP group are deleted.
Top

Examples

Example 1: Deleting All Expired Spooled Files

DLTEXPSPLF   ASPGRP(*ALL)

This command deletes all expired spooled files on the system.

Example 2: Deleting All Expired Spooled Files in the System ASP (ASP 1) and All Defined Basic User ASPs (ASPs 2-32)

DLTEXPSPLF   ASPGRP(*SYSBAS)

This command deletes all expired spooled files in the system ASP (ASP 1) and all defined basic user ASPs (ASPs 2-32).

Example 3: Creating a Job Schedule Entry to Remove Expired Spooled Files

ADDJOBSCDE   JOB(DLTEXPSPLF)  CMD(DLTEXPSPLF  ASPGRP(*ALL))
             FRQ(*WEEKLY)  SCDDATE(*NONE)  SCDDAY(*ALL)
             SCDTIME(010000)  JOBQ(QSYS/QSYSNOMAX)
             TEXT('DELETE EXPIRED SPOOLED FILES SCHEDULE ENTRY')

This command creates a job schedule entry which causes the DLTEXPSPLF command to run daily at the time specified in the SCDTIME parameter in the job queue specified in the JOBQ parameter. Using the FRQ(*WEEKLY) and SCDDAY(*ALL) parameters will schedule the job to run every day of the week.

Top

Error messages

*ESCAPE Messages

CPF3330
Necessary resource not available.
CPF334F
Not authorized to command Delete Expired Spooled files (DLTEXPSPLF).
CPF9825
Not authorized to device &1.
CPFB8E9
ASP group &1 not set for thread &2.
Top