I would like to purge all jobs in the JES2 Spool PRINT queue that are older than n days and that start with a prefix of XXX?
I've looked at the JES2 commands and, to be frank, I can't make heads or tails out of the various cancel and purge commands.
I typically use the following command:
$pojq,jm=XXX,days>Y
(where XXX is the job "filter" and Y is # of days)
The above command purges all job output matching the filters, so you may want to further reduce it's range by adding Q=? so you only purge output on a specified class or classes. You can specify multiple classes.
For example: $pojq,jm=XXX,days>Y,q=abc