*SPOOL Delete Command File

Line 100 of this simple command file tells *SPOOL to delete jobs from SP1 that are more than 365 days old whether or not they’ve been printed; line 200 says to delete jobs from SP2 that are more than 30 days old, but only if they've already been printed.

You can clean up as many spoolers as you need to with a multi-line command file, specifying a different spooler on each line. Lines requires the following format:

DELETE spooler,first-job,[last-job],[delete-override]

where: 

spooler is the name of spooler that you want to delete jobs from.

older-than-days is a negative number indicating how many days before today's date. Jobs older than this will be deleted.

delete-override is Y or N:

Note:
*SPOOL’s delete function also supports deletion by job number and date range, but the older-than-days option is especially useful for automating the spooler cleanup.