Many mainframe beginners will be familiar with how to manually purge job outputs from the JES spool one by one – that is, accessing the job status log via SDSF;ST and placing a P against the job entry to be purged. But there are ways we can purge multiple jobs without having to manually enter a P against each job out.
Most site setups will have automation in place to clear the spool after a given amount of time has passed, but for various reasons we may want to clean up the spool sooner.
The first way:
Purging a range. Let’s consider that we a viewing the SDSF;ST panel, and we have a filter of USER ‘our UID’ applied. There is a block of multiple job outputs in a row we wish to clear.
To purge a range of job outputs we can place a ‘//P’ in the action column of the first block of the job series, and a ‘//’ in the last job of the series. Much like entering block commands in an ISPF edit session. Hitting enter on this will purge the selected job outputs (inclusive) and everything listed between them.
The second way:
JES2 Commands. JES2 commands can be entered the same way most MVS commands are; via the console or in any SDSF panel prefixed with a ‘/’. JES2 commands are also prefixed with a ‘$’ to differentiate them from other system and product commands.
The command ‘/$POJQ,JM=*’ in SDSF, or just ‘$POJQ,JM=*’, will Purge Output from the Job Queue under the Job Mask *. As you may know from other MVS conventions the wild card * can be used to represent ‘any‘. So the above command will purge ALL job outputs. Be careful when issuing this as you may accidentally purge job outputs you didn’t mean to.
Luckily, $PO offers many different parameters to target only certain subsections of job outputs. These parameters can also be mixed and matched within the same commands to narrow down the subsection even further.
- $POJQ,JM=JOB12* – Purge job outs beginning with the name JOB12*
- $POJQ,Q=B – Purge job outs in class B
- $POJQ,days>2 – Purge job outs that are older than two days
Leave a comment