CL Command Reference - DLTEXPSPLF
CL Command List > DLTEXPSPLF Reference
Description:
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:
. You need spool control (*SPLCTL) special authority to use this command. If *ALL or a specific ASP group (ASPGRP) is specified, the user must be authorized to the ASP group and the status of the ASP group must be AVAILABLE.
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.