z/OS JES2 Commands
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


$P O Job - Purge a job's output

z/OS JES2 Commands
SA32-0990-00

Function

To cancel a job's output and remove all traces of the output from the system.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-$P O--+-Job--+--+--------------------------------------+----->
         +-JOBQ-+  +-nn--+------------+-------------------+   
         +-JQ---+  |     '- ---+-mm-+-'                   |   
         +-Stc--+  |           '-*--'                     |   
         '-Tsu--'  +-'--output--'-------------------------+   
                   |    .-,--------------------------.    |   
                   |    V                            |    |   
                   '-(----+-+-nn-+--+------------+-+-+--)-'   
                          | '-*--'  '- ---+-mm-+-' |          
                          |               '-*--'   |          
                          +-output-----------------+          
                          '-'--output--'-----------'          

>--+-----------------+------------------------------------------>
   +-,--+---+--ALL---+   
   |    '-/-'        |   
   +-,--+---+--READY-+   
   |    '-/-'        |   
   '-,--+---+--HELD--'   
        '-/-'            

>--+--------------------------------------------------------+--->
   '-,--+---+--CMDauth--+-=--+--+-cmdauth-----------------+-'   
        '-/-'           '-¬=-'  |    .-,-------------.    |     
                                |    V  (1)          |    |     
                                '-(----------cmdauth-+--)-'     

>--+---------------------------------+-------------------------->
   '-,--+-+---+--Age--+--+->-+--days-'   
        | '-/-'       |  '-<-'           
        '-+---+--DAys-'                  
          '-/-'                          

>--+-------------------------------+---------------------------->
   '-,--+---+--Hours--+->-+--hours-'   
        '-/-'         '-<-'            

>--+----------------------------------------+------------------->
   '-,--+-+---+--JM------+--+-=--+--jobmask-'   
        | '-/-'          |  +-¬=-+              
        '-+---+--JOBMASK-'  +->--+              
          '-/-'             '-<--'              

>--+----------------------------------+------------------------->
   '-,--+---+--OUTGrp--+-=--+--outgrp-'   
        '-/-'          '-¬=-'             

>--+--------------------------------+--------------------------->
   '-,--+---+--PAGES--+-=--+--pages-'   
        '-/-'         +-^=-+            
                      +->--+            
                      '-<--'            

>--+---------------------+-------------------------------------->
   '-,--+---+--PROTected-'   
        '-/-'                

>--+--------------------------------+--------------------------->
   '-,--+---+--Queue--+-=--+--queue-'   
        '-/-'         '-¬=-'            

>--+------------------------------------+----------------------->
   '-,--+---+--REBUILD--+-=--+--+-No--+-'   
        '-/-'           '-¬=-'  '-Yes-'     

>--+------------------------------------+----------------------->
   '-,--+---+--RECORDS--+-=--+--records-'   
        '-/-'           +-^=-+              
                        +->--+              
                        '-<--'              

>--+------------------------------------------+----------------->
   '-,--+-+---+--Dest-----+--+-=--+--routecde-'   
        | '-/-'           |  +-¬=-+               
        '-+---+--Routecde-'  +->--+               
          '-/-'              '-<--'               

>--+--------------------+--------------------------------------->
   '-,--Burst=--+-NO--+-'   
                '-YES-'     

>--+-----------------------------------+------------------------>
   '-,--CC--+------------------------+-'   
            |       .-----------.    |     
            |       V           |    |     
            '-=--( ---+-ABEND-+-+--)-'     
                      +-CODE--+            
                      '-TYPE--'            

>--+--------------------+--+------------------------+----------->
   '-,--+-C---+--=--fcb-'  '-,--+-FLash-+--=--flash-'   
        '-FCB-'                 '-O-----'               

>--+------------------+--+--------------------+----------------->
   '-,--Forms=--forms-'  '-,--HOLD=--+-OPER-+-'   
                                     +-SYS--+     
                                     '-NONE-'     

>--+------------------------------+----------------------------->
   '-,----OUTDISP----=--+-H-----+-'   
                        +-HOLD--+     
                        +-K-----+     
                        +-KEEP--+     
                        +-L-----+     
                        +-LEAVE-+     
                        +-P-----+     
                        +-PURGE-+     
                        +-W-----+     
                        '-WRITE-'     

>--+------------------------+--+--------------------+----------->
   '-,--PRIORITY=--priority-'  '-,--PRmode=--prmode-'   

>--+----------------------+--+------------------------+--------->
   '-,--RECORDS=--records-'  '-,--SECLABEL=--seclabel-'   

>--+--------------------+--------------------------------------->
   '-,--+-T---+--=--ucs-'   
        '-UCS-'             

>--+----------------------------------+------------------------->
   '-,--+---+--TPJOBID--+-=--+--jobid-'   
        '-/-'           +-^=-+            
                        +->--+            
                        '-<--'            

>--+-----------------------------------+------------------------>
   '-,--+---+--TPJOBN--+-=--+--jobname-'   
        '-/-'          +-^=-+              
                       +->--+              
                       '-<--'              

>--+--------------------+--+--------------------+--------------->
   '-,--USERID=--userid-'  '-,--Writer=--writer-'   

>--+---------------------------------+-------------------------><
   '-| Selection limiting keywords |-'   

Selection limiting keywords

|--+-----------------------------------------------+------------|
   '-,--+-+---+--JC------+--+-=--+--job correlator-'   
        | '-/-'          |  +-^=-+                     
        '-+---+--JOBCORR-'  +->--+                     
          '-/-'             '-<--'                     

Notes:
  1. cmdauth can be coded up to 2 times

Parameters

Age|DAys<days | Age|DAys>days
Specifies the age of affected output in days. Only output more (with DAYS>nn) or less (with DAYS<nn) than the specified number of days in age are affected, The days are counted from the current hour.
ALL
JES2 cancels the specified job's output elements based on the presence of filters as follows:
ALL specified? Filters? Meaning
YES YES Command is rejected
YES NO Command applies to all job output elements belonging to the specified job
NO YES ALL is not considered
NO NO Command applies to all job output elements belonging to the specified job
Burst={No|Yes}
Specifies whether the printed output is to be burst into separate sheets (Yes) or to be in continuous, fanfold mode (No).
CC=(ABEND|ABENDED|CANcelled|CNVT_abend|CODE| COMPleted|ENDed_by_cc|EOM_failure|JCLerror| SECurity_failure|TYPE)
Displays the completion information associated with the job.
ABENDED
Display only jobs which have abnormally ended.
ABEND
Displays the ABEND code associated with the job's termination.
CANcelled
Display only jobs which were cancelled by the operator.
CNVT_abend
Display only jobs which have abnormally ended during the conversion phase.
CODE
Displays the last (or highest) completion code of steps in the job.
COMPleted
Display only jobs which completed.
ENDed_by_cc
Display only jobs which were ended by a step completion code.
EOM_failure
Display only jobs which failed in end-of-memory processing.
JCLerror
Display jobs which did not execute due to a JCL error.
SECurity_failure
Display jobs which failed security validation.
C|FCB=fcb
A 1 to 4 alphanumeric character or special character ($ # @) identifier for the data set forms control or carriage specifications.
CMDauth=(auth1{,auth2})
Only the output that can be affected from the specified remote(s) or node(s) will be purged. The valid specifications are:
LOCAL|ANYLOCAL
Only the local devices at the local node can affect the output.
Nnnnn|nodename
Only local devices at the specified node can affect the output.
Rnnnn
Only the specified remote device can affect the output.
NnnnnRnnnn|nodename.Rnnnn
Only the specified remote device at the specified remote node can affect the output.
destid
A destid corresponding to any of the above remote devices.
Note: Specification of the CMDAUTH filter does not override the authority of the console from which the command is issued; both the authority of the console and the specified CMDAUTH filter must match for the job to be affected.
Dest|Routecde=routecde
Only those data sets that are to be routed to the specified destination are cancelled. If more than one R= operand is specified, the last one entered is used. For routing specification requirements, see Route codes.

A variety of filters can be used to select a range of routecdes. For example, R>R1, R<=R10. You can also specify wild cards on this parameter. See Using wildcards.

If this command originates from another node in the network and the R= operand does not specify a node (first-level destination), the receiving node defaults the first-level destination to the node where the command originated.

If this command is sent to another node in the network using the $N command, be aware that the receiving node will default the node (first-level destination) of the R= operand to the sending node. If another node is desired, specify a destination on the R= operand that will resolve to the desired node (first-level destination) at the receiving node.

Note:
  1. NODENAME=REQUIRED on the DESTDEF initialization statement will cause JES2 to require that a userid be prefixed with a node name.
  2. Greater than (> or >=) and less than (< or <=) filters may be used in conjunction to support route code ranges. For example, you could specify the filters R>=R1,R<=R7 to affect output for all remotes in the range R1 to R7, Note that:
    • The destination being filtered upon is converted to its binary equivalent prior to the comparison.
    • Open-ended ranges (for example, a > filter without a < filter, or a < filter without a > filter) are not allowed.
    • When using nodal ranges, a specification of "nodename.*" must be used. Only the nodal routing of the output will be compared.

The valid specifications are:

LOCAL|ANYLOCAL
Indicates that jobs are to be run at the local node.
Nnnnn|nodename
Indicates that jobs are to be run at the specified node(s). You can specify a node using the decimal node identifier or an EBCDIC nodename.
destid
Indicates that jobs are to be run at the specified node(s). You can specify this location by an alias for the name of a node. If destid is specified alone, it refers to both the node and the remote.
NnnnnRmmmm|node.remote|node.userid
Indicates routing to the remote Rmmmm at the node Nnnnn. Rmmmm can also be specified as RMmmmm or RMTmmmm.
Ummmm
Indicates special local routing.
node.destid
Indicates a destination at the specified node. The destid refers to both the node and the remote. The node specified in the destid must be the same as the node portion of the route code. If the number of the remote is reassigned, you can use the destid to send to this node.
remote
Indicates routing to a remote. Remote can be specified in any of the following ways:
LOCAL|ANYLOCAL
Indicates that jobs are to be run at the local node.
Rmmmm
Indicates routing to the specified remote. Rmmmm can also be specified as RMmmmm or RMTmmmm.
destid
Indicates routing to a destid referring to a remote.
userid
Indicates routing to a valid TSO userid. If the userid ends in *, this route code refers to all userids beginning with the characters that precede the *.
Note: Exercise caution when specifying non-local userids that end with *. For example, if you specify NODE2.FRED*, it will cause all output with current route codes NODE2.FREDDY as well as NODE2.FRED* to be purged.
*
Indicates all output for the local node, including special local, userid, and a remote workstation on the local node.
node.*
Displays output for all userids at the local node.
node.*-node.*
FLASH|O=flash
A 1 to 4 alphanumeric or special character ($ # @) overlay name (FLASH).
Forms=forms
A 1 to 8 alphanumeric or special character ($ # @) identifier for the print or punch forms.
HELD
Output is HELD if it is destined for this node and the output disposition is HOLD or LEAVE.
H|Hours>hours | H|Hours<hours
Specifies the age of affected output in hours. Only output more (with HOURS>nn) or less (with HOURS<nn) than the specified number of hours in age are affected.
HOLD={NONE|OPER|SYS}
Displays the hold status of the job. Only output groups with the specified hold type (OPER, SYS, or NONE) are to be purged.
HOLDRC
Only output groups with the specified system hold reason code are to be purged (when HOLD=SYS).
JC|JOBCORR=job correlator
Specifies a combination of 1-64 alphanumeric, special (colon, period or underscore) and wildcard characters that can be used to select a subset of jobs that have a matching job correlator. For a description of wildcard characters, refer to Using wildcards.
JM|JOBMASK=jobmask
Specifies 1– to 8–alphanumeric, special ($, #, or @) or wildcard characters (or a combination of them) that can be used to select a subset of jobs whose job name matches this combination of characters (mask). For a description of using wild cards, see Using wildcards.
Note:
  1. This is a positional parameter. Specify this following the job_id (JOB, STC, or TSU), or JOBQ parameter.
  2. The JOBMASK parameter is not valid with the 'jobname' parameter.
Job
A Batch job or range of batch jobs is to be cancelled.
JOBQ|JQ
Specifies all jobs, STCs, and TSUs across the MAS for processing.
OUTDISP={H|HOLD|K|KEEP|L|LEAVE|P|PURGE|W|WRITE}
Indicates that you wish to display the output for the specified job that matches this current disposition. Specify WRITE, HOLD, LEAVE, or KEEP.
Note: If you do not specify this parameter, all output with a disposition of WRITE, HOLD, KEEP, or LEAVE will be modified.
OUTGrp=outgrp
The job output element(s) that are cancelled.
grpid
The 1– to 8–character alphanumeric group ID that is either specified by the user in the JCL or generated by JES2. If you specify only group ID (OUTGRP=grpid) on this command, JES2 cancels all the held job output elements in that group.
joeid1
A number assigned by JES2 to distinguish between job output elements within the output group. If you specify only group ID and the first qualifier (OUTGRP=grpid.joeid1) on this command, JES2 releases or cancels all copies of the specified job output element in that group.
joeid2
A number assigned by JES2 to distinguish between several copies of grpid.joeid1. If you specify group ID and both qualifiers (OUTGRP=grpid.joeid1.joeid2) on this command, JES2 releases or cancels only the specified copy (joeid2) within the job output element (joeid) in that group.
Note: This parameter is positional. If specified, it must immediately follow the jobid (JOB, STC, TSU), JOBQ or 'jobname' (or JOBMASK if coded) parameter.
output
Specifies 1– to 8– alphanumeric, special ($, #, or @) or wildcard characters (or a combination of them) that can be used to select a subset of jobs whose job name matches this combination of characters (mask).
‘output'
The name of the job that is cancelled. This name must appear as coded on the JOB statement and must be enclosed in apostrophes. If more than one job exists with this name, no action is taken.
PAGES
Only output groups with the specified number of pages are to be cancelled.
PRIORITY=priority
The queue selection priority (0-255) assigned to the job output element(s).
PRmode=prmode
The process mode (1 to 8 alphanumeric characters) for the job output element(s).
PROTected
Indicates that all specified output groups, including output groups for jobs that have been specified 'protected', should be cancelled. The 'protected' attribute is assigned to programs running in a transactional environment such as APPC or OMVS, where the transaction output is associated with the initiators like ASCHINIT or BPXAS. The 'protected' attribute can also be assigned to jobs by JES2 installation exits.
Queue=queue
The held output in the specified output class(es) (A-Z and 0-9) is cancelled. A maximum of 36 classes may be specified. The Q= keyword and the ALL parameter are mutually exclusive.
READY
Output is READY if it is not HELD.
REBUILD={No|Yes}
Output on the rebuild queue is to be cancelled (Yes) or not cancelled (No).
RECORDS=records
Only output groups with the specified number of records are to be cancelled.
SECLABEL=seclabel
The security label associated with the output group.
Stc
A started task or range of started tasks is to be cancelled.
Tsu
A time-sharing user or range of time-sharing users is to be cancelled.
T|UCS=ucs
A 1 to 4 alphanumeric or special character ($ # @) identifier for the universal character set specification. This will also set the character set (CHAR1) to be used on non-impact printers unless the UCS and CHARS values are both assigned to an output data set by a job's JCL and their values are not equal.
TPJOBID=jobid
Only output groups with the specified transaction job ID are to be cancelled.
TPJOBN=jobname
Only output groups with the specified transaction job name are to be cancelled.
USERID=userid
The userid associated with the output group.
Writer=writer
A 1-8 alphanumeric or special character ($ # @) writer name assigned to the job output element(s).

Authority Required

This command requires job authority. The description of the $T RDRnn command explains how to ensure that the authority of the appropriate MVS™ system command group is assigned.

This command requires update security access authority. For a description of assigning command input authority, see z/OS JES2 Initialization and Tuning Guide, SA32-0991.

Scope

MAS–wide. This command has an effect across the entire MAS. There is no need to have this command issued to all members of the MAS.

Messages

The $HASP000 message indicates the command was accepted.

Upon completion, JES2 issues the $HASP686 message.

The $HASP686 message is issued for each output group to be cancelled.

Examples

 1   $p o j'fred',outgrp=1.1.1

  JOB00012 $HASP686  OUTPUT(FRED)     OUTGRP=1.1.1 CANCELLED
JES2 cancels the specified output group.
 2   $p o jq,q=b,r=r1

  JOB00012 $HASP686  OUTPUT(FRED)     OUTGRP=1.1.1 CANCELLED
  JOB00012 $HASP686  OUTPUT(FRED)     OUTGRP=2.1.1 CANCELLED
  JOB00016 $HASP686  OUTPUT(WILMA)    OUTGRP=1.1.1 CANCELLED
  JOB00017 $HASP686  OUTPUT(BARNEY)   OUTGRP=6.1.1 CANCELLED
  JOB00017 $HASP686  OUTPUT(BARNEY)   OUTGRP=7.1.1 CANCELLED
JES2 cancels all class B output destined for remote workstation 1.
 3   $p o jq,r=denver,q=bk

  TSU00027 $HASP686  OUTPUT(FRED)     OUTGRP=1.1.1 CANCELLED
  TSU00027 $HASP686  OUTPUT(FRED)     OUTGRP=2.1.1 CANCELLED
  TSU00027 $HASP686  OUTPUT(FRED)     OUTGRP=3.1.1 CANCELLED
  JOB00047 $HASP686  OUTPUT(BARNEY)   OUTGRP=6.1.1 CANCELLED
  JOB00047 $HASP686  OUTPUT(BARNEY)   OUTGRP=7.1.1 CANCELLED

JES2 cancels all class output in classes B and K destined for DENVER. (DENVER is an installation-defined name, which must equate to one of the valid destination forms.)

 4   $p o jobq,q=c,hours>12,days<1

  JOB00041  $HASP686 OUTPUT(IEBGENE1)  OUTGRP=1.1.1 CANCELLED
  JOB00042  $HASP686 OUTPUT(IEBGENE1)  OUTGRP=3.1.1 CANCELLED
  JOB00042  $HASP686 OUTPUT(IEBGENE1)  OUTGRP=2.1.1 CANCELLED
  JOB00042  $HASP686 OUTPUT(IEBGENE1)  OUTGRP=1.1.1 CANCELLED
  JOB00043  $HASP686 OUTPUT(IEBGENE1)  OUTGRP=3.1.1 CANCELLED

JES2 cancels all class C output that is at least 12 hours old but not more than 1 day old.

 5  $poj11-12,hours>0                                 

  JOB00011  $HASP686 OUTPUT(IEBANY)    OUTGRP=1.1.1 CANCELLED 
  JOB00012  $HASP686 OUTPUT(IEBGENER)  OUTGRP=1.1.1 CANCELLED 
  JOB00012  $HASP250 IEBGENER PURGED -- (JOB KEY WAS B3FB7D76)
  JOB00011  $HASP250 IEBANY PURGED -- (JOB KEY WAS B3FB7D6D)   
 

JES2 cancels the specified jobs with hours >0.

 6  $POJOBQ,ALL,PROTECTED,DAYS>7

  $HASP686  OUTPUT(IRRDPTAB)  OUTGRP=1.1.1 CANCELLED 
  $HASP686  OUTPUT(INIT)      OUTGRP=1.1.1 CANCELLED 
  $HASP686  OUTPUT(NEWSJ)     OUTGRP=1.1.1 CANCELLED 
  $HASP686  OUTPUT(BPXAS)     OUTGRP=1.1.1 CANCELLED 
  $HASP686  OUTPUT(BPXAS)     OUTGRP=1.1.1 CANCELLED 
  $HASP686  OUTPUT(BPXAS)     OUTGRP=1.1.1 CANCELLED 
  $HASP686  OUTPUT(IBMUSERJ)  OUTGRP=1.1.1 CANCELLED 
  $HASP250  BPXAS PURGED -- (JOB KEY WAS C10E25E5) 
  $HASP250  IBMUSERJ PURGED -- (JOB KEY WAS C10E3170) 
  $HASP250  BPXAS PURGED -- (JOB KEY WAS C10E25E2) 
  $HASP250  BPXAS PURGED -- (JOB KEY WAS C10E25D3) 
  $HASP250  NEWSJ PURGED -- (JOB KEY WAS C10E259E) 
  $HASP250  INIT PURGED -- (JOB KEY WAS C10E259D) 
  $HASP250  IRRDPTAB PURGED -- (JOB KEY WAS C10E259C) 
 

JES2 cancels all jobs with days>7.

 7  $po s'aschint',/tpjobn=testjob,tpjobid=a0000014,protect

  STC00017 $HASP686 OUTPUT(ASCHINT)  OUTGRP=TESTJOB.4.1 CANCELLED
  STC00017 $HASP686 OUTPUT(ASCHINT)  OUTGRP=TESTJOB.3.1 CANCELLED
  STC00017 $HASP686 OUTPUT(ASCHINT)  OUTGRP=TESTJOB.2.1 CANCELLED
  STC00017 $HASP686 OUTPUT(ASCHINT)  OUTGRP=TESTJOB.1.1 CANCELLED

JES2 cancels transaction job names of TESTJOB with transaction job ID of A0000014.

 8  $p o jq,jc=*:*TEMPOUTPUT*

  JOB00146  $HASP686 OUTPUT(D15USER1)  OUTGRP=1.1.1 CANCELLED   
  JOB00147  $HASP686 OUTPUT(D15USER2)  OUTGRP=1.1.1 CANCELLED   
  JOB00148  $HASP686 OUTPUT(D15USER3)  OUTGRP=1.1.1 CANCELLED   
  JOB00149  $HASP686 OUTPUT(D15USER4)  OUTGRP=1.1.1 CANCELLED   
- JOB00149  $HASP250 D15USER4 PURGED -- (JOB KEY WAS C88BDE1C)  
- JOB00148  $HASP250 D15USER3 PURGED -- (JOB KEY WAS C88BDE1B)  
- JOB00147  $HASP250 D15USER2 PURGED -- (JOB KEY WAS C88BDE1A)  
- JOB00146  $HASP250 D15USER1 PURGED -- (JOB KEY WAS C88BDE19)  

JES2 cancels all batch jobs with a job correlator user portion containing TEMPOUTPUT.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014