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


$C O Job - Cancel output

z/OS JES2 Commands
SA32-0990-00

Function

To cancel specific output groups or individual job output elements created by a job.

Syntax

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

>--+---------------+-------------------------------------------->
   '-,--+---+--ALL-'   
        '-/-'          

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

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

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

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

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

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

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

>--+--------------------------------+--+-----------------+------>
   '-,--+---+--Queue--+-=--+--queue-'  '-,--+---+--READY-'   
        '-/-'         '-^=-'                '-/-'            

>--+------------------------------------+----------------------->
   '-,--+---+--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=--+-ALL--+-'   
                                     +-JOB--+     
                                     +-DUP--+     
                                     +-ARM--+     
                                     '-NONE-'     

>--+-----------+--+------------------+-------------------------->
   '-,--HOLDRC-'  '-,--+-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)
Specifies the completion information associated with the job.
ABENDED
Specifies only jobs which have abnormally ended.
ABEND
Specifies the ABEND code associated with the job's termination.
CANcelled
Specifies only jobs which were cancelled by the operator.
CNVT_abend
Specifies only jobs which have abnormally ended during the conversion phase.
CODE
Specifies the last (or highest) completion code of steps in the job.
COMPleted
Specifies only jobs which completed.
ENDed_by_cc
Specifies only jobs which were ended by a step completion code.
EOM_failure
Specifies only jobs which failed in end-of-memory processing.
JCLerror
Specifies jobs which did not execute due to a JCL error.
SECurity_failure
Specifies 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=(cmdauth1{,cmdauth2})
Only the output that can be affected from the specified remote(s) or node(s) will be cancelled. 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
The destination assigned to the job output element(s). Only job output destined for "dest" is cancelled. You may specify a remote destination (workstation), another node, or a specific local device. The value for all routing numbers can range from 1 to 32767. Use parentheses if more than one route code is specified.

If this command originates from another node in the network and the D|ROUTECDE= operand does not specify a node (first-level destination), the receiving node defaults the first-level destination to the node were 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 D|ROUTECDE= operand to the sending node. If another node is desired, specify a destination on the D|ROUTECDE= 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.
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.
HOLD={NONE|OPER|SYS}
Specifies the hold status of the job. Only output groups with the specified hold type (OPER, SYS, or NONE) are to be canceled.
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.
HOLDRC
Only output groups with the specified system hold reason code are to be purged (when HOLD=SYS).
Job
A Batch job or range of batch jobs is to be cancelled.
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.
JOBMASK|JM=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 additional information, 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.
JOBQ|JQ
Specifies all jobs, STCs, and TSUs across the MAS for processing.
The following specifications are valid:
LOCAL|ANYLOCAL
Indicates that jobs are to be printed or punched at the local node.
destid
Indicates that jobs are to be printed or punched 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.
Nnnnn|nodename
Indicates that jobs are to be printed or punched at the specified node(s). You can specify a node using the decimal node identifier or an EBCDIC nodename.
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 printed or punched 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.
node.*
Indicates that the node name is to be modified to the specified node name, but the remote name will remain the same.
*
Indicates that the node name is to be modified to the local node name, but the remote name will remain the same.
OUTDISP={H|HOLD|K|KEEP|L|LEAVE|P| PURGE|W|WRITE}
Indicates that you want to display the output for the specified job that matches this current disposition. Specify WRITE, HOLD, LEAVE, or KEEP. If you do not specify this parameter, all output with a disposition of WRITE, HOLD, KEEP, or LEAVE will be modified.
OUTGrp=grpid[.joeid1[.joeid2]]
The job output group or the job output element that is cancelled.
grpid
The 1 to 8 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 job output elements in that output 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 cancels all the copies of the specified job output element in that output 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 cancels only the specified copy (joeid2) within the job output element (joeid1) in that output group.
Note: The OUTGRP parameter is positional and must immediate 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 whose output 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 that have been specified ‘protected', should be purged. 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.
Note: Since the OUTGRP= parameter identifies the output to be cancelled, you do not need to specify PROTECTED with this command, even for output that is protected.
Queue=queue
Only output in the specified output class(es) is to be cancelled. Up to 36 output classes may be listed.
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.
RECORDS=records
The number of print records associated with the output group.
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 operand also sets 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 to 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.

Processing Considerations

If you want to cancel both a job and its output, see $C Job - Cancel a job.

Scope

MAS-wide. This command has an effect across the entire MAS.

Messages

The $HASP686 displays all the output groups that are cancelled.

Examples

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

  JOB00012 $HASP686 OUTPUT(FRED)     OUTGRP=1.1.1 CANCELLED
JES2 cancels the specified output group.
 2   $c 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   $c o jq,all,a>8

  JOB00012 $HASP686 OUTPUT(FRED)     OUTGRP=1.1.1 CANCELLED
  JOB00016 $HASP686 OUTPUT(WILMA)    OUTGRP=1.1.1 CANCELLED
  JOB00017 $HASP686 OUTPUT(BARNEY)   OUTGRP=7.1.1 CANCELLED
JES2 cancels all output in the system more than 8 days old.
 4   $c 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.)
 5   $co s'aschint',tpjobn=testjob,tpjobid=a0000014,protect

  STC00017 $HASP686 OUTPUT(ASCHINT)  OUTGRP=TESTJOB.1.1 CANCELLED
  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

JES2 cancels the transaction job name of TESTJOB and transaction job ID of A0000014.

Start of change
 6  $c o jq,jc=*:*applicationXYZtestrun*

     JOB00104  $HASP686 OUTPUT(D15USER1)  OUTGRP=1.1.1 CANCELLED          
     JOB00105  $HASP686 OUTPUT(D15USER2)  OUTGRP=1.1.1 CANCELLED          
     JOB00106  $HASP686 OUTPUT(D15USER3)  OUTGRP=1.1.1 CANCELLED          
     JOB00107  $HASP686 OUTPUT(D15USER4)  OUTGRP=1.1.1 CANCELLED          
   - JOB00106  $HASP250 D15USER3 PURGED -- (JOB KEY WAS C88BCE3C)         
   - JOB00107  $HASP250 D15USER4 PURGED -- (JOB KEY WAS C88BCE3D)         
   - JOB00105  $HASP250 D15USER2 PURGED -- (JOB KEY WAS C88BCE3B)         
   - JOB00104  $HASP250 D15USER1 PURGED -- (JOB KEY WAS C88BCE3A)         
End of change JES2 cancels all output in the system with a job correlator user portion containing APPLICATIONXYZTESTRUN.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014