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


$E Job - Restart a job

z/OS JES2 Commands
SA32-0990-00

Function

To restart a job.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-$E----------------------------------------------------------->

>--+-Job--+--+--------------------------------------+--+--------------------------+-->
   +-JOBQ-+  +-nn--+------------+-------------------+  '-,--+-Cancel------------+-'   
   '-JQ---'  |     '- ---+-mm-+-'                   |       '-Step--+---------+-'     
             |           '-*--'                     |               '-,--Hold-'       
             +-'--job--'----------------------------+                                 
             |    .-,--------------------------.    |                                 
             |    V                            |    |                                 
             '-(----+-+-nn-+--+------------+-+-+--)-'                                 
                    | '-*--'  '- ---+-mm-+-' |                                        
                    |               '-*--'   |                                        
                    +-job--------------------+                                        
                    '-'--job--'--------------'                                        

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

Selection limiting keywords

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

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

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

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

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

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

>--+------------------------------------------------------------------------------------------+-->
   |                            .-,------------------------------------------------------.    |   
   |                            V                                                        |    |   
   '-,--+-+---+--SPL---+--=--(----+-+-+---+--%-------+--+->-+--percent-----------------+-+--)-'   
        | '-/-'        |          | | '-/-'          |  '-<-'                          |          
        '-+---+--SPOOL-'          | '-+---+--Percent-'                                 |          
          '-/-'                   |   '-/-'                                            |          
                                  +-+---+--Tgs--+->-+--tgs-----------------------------+          
                                  | '-/-'       '-<-'                                  |          
                                  '-+---+--Volumes--+-=--+--+-volume-----------------+-'          
                                    '-/-'           '-^=-'  |    .-,------------.    |            
                                                            |    V  (2)         |    |            
                                                            '-(----------volume-+--)-'            

>--+------------------------------------+--+----------+--------->
   '-,--+---+--XEQNode--+-=--+--xeqnode-'  '-,--CLass-'   
        '-/-'           '-^=-'                            

>--+---------+--+-------------+--+-----------+------------------>
   '-,--OFFS-'  '-,--Priority-'  '-,--SCHENV-'   

>--+---------------+--+-------------+--+-----------------+------>
   '-,--SCHENV_AFF-'  '-,--SECLABEL-'  '-,--SECLABEL_AFF-'   

>--+-------------+---------------------------------------------->
   '-,--SRVCLASS-'   

>--+-----------------------------------------------------------------+-->
   '-+---+--Sysaff--=--+-memname-----------------------------------+-'   
     '-/-'             +-ANY---------------------------------------+     
                       +-IND---------------------------------------+     
                       '-(--+-memname-------------------------+--)-'     
                            +-ANY-----------------------------+          
                            | .-,---------------------------. |          
                            | V                       (3)   | |          
                            '-----+----+--+-memname-+-------+-'          
                                  +-=--+  +-ANY-----+                    
                                  '-^=-'  '-IND-----'                    

>--+-----------+------------------------------------------------|
   '-,--USERID-'   

Notes:
  1. cmdauth can be coded up to 2 times
  2. volume can be coded up to 253 times
  3. Multiple Sysaff values can be coded up to 33 times

Parameters

Age|DAys<days | Age|DAys>days
Specifies the age of affected jobs in days. Only jobs 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.
Cancel
Indicates that the job is to be cancelled and held prior to execution. This operand is equivalent to specifying a $H and $C command, in addition to the $E command.
Class=class
Start of changeSpecifies a job class used to select a subset of jobs that have a matching job class. Wildcard characters can also be specified: see Using wildcards for details.End of change
CMDauth=(auth1{,auth2})
Only the jobs that can be affected from the specified remote(s) or node(s) will be restarted. 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.
Hours=hours
Specifies the age of affected jobs in hours. Only jobs more (with HOURS>nn) or less (with HOURS<nn) than the specified number of hours in age are affected.
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 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
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).
‘job'
The name of the job that is restarted. 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.
Job
A batch job or range of batch jobs is to be restarted.
JOBQ|JQ
Specifies all jobs, STCs, and TSUs across the MAS for processing.
OFFS=offs
Specifies offload device numbers on which the job has been archived.
Priority=priority
Specifies the priority of the job.
REBUILD={No|Yes}
Indicates that jobs on the rebuild queue are to be restarted (Yes) or not restarted (No).
SCHENV=schenv
Specifies the scheduling environment associated with the job.
SCHENV_AFF=member
Specifies the JES2 MAS members on which the scheduling environment for this job is available.
SECLABEL_AFF=member
Specifies the JES2 MAS members on which the SECLABEL for this job is available but only if the RACF® SECLABEL_BY_SYS is also active.
SECLABEL=seclabel
Specifies the security label associated with the job.
SPL|SPOOL={Percent|%|Tgs|Volumes}
Only jobs with specific SPOOL characteristics are to be restarted:
Percent|%
Only jobs using more (with %>nn) or less (with %<nn) than the specified percentage of the total available spool space are to be released.
Tgs
Only jobs using more (with Tgs>nn) or less (with Tgs<nn) than the specified number of track groups are to be released.
Volumes=(v1,v2,...)
Only jobs which have allocated spool space on one or more specified spool volumes are to be released.
SRVCLASS=srvclass
Specifies the service class of the job. The service class is available for batch jobs only. It is not available for started tasks or time-sharing users. The default workload manager (WLM) policy assigns a service class of blanks to all jobs, and WLM-managed initiators can then select such jobs for processing.
Step [,Hold]
Restarts the job at the next step once the current step completes. By default, the job is placed back in the execution queue in the ready state, and will re-execute immediately. However, if the current step is the final step in the job, the Step parameter has no effect and the job will exit the execution phase.

The optional Hold parameter causes the job to be held and re-queued for execution once the current step completes.

Attention:
  1. The Step parameter requires that the job use journaling. If the job does not have a journal, the $E command will fail.
  2. The Step parameter is designed for moving a job to another system for re-execution at a step boundary. To move a job, it must no longer be eligible to run on the original system, which can be achieved by altering the affinity of the job, or by draining the job class, service class or member that the job is currently executing on.
Sysaff
Specifies jobs to process based on this system affinity. Up to 33 entries can be coded by using a combination of the following values:
memname
Specifies the identifier (1 to 4 alphanumeric characters) of a member in the JES2 multi-access spool configuration that a job has in its system affinity list.
ANY
Specifies jobs that are eligible to run on any member in the JES2 multi-access spool configuration. If you specify ANY followed by the IND parameter, they must be separated by a comma and the list must be enclosed in parentheses, for example, (ANY,IND).
IND
Specifies the job that is selected and must be executed on a processor operating in independent mode.
USERID=userid
Specifies the userid associated with the job.

Processing

Command processing verifies that the requested jobs are in the execution phase, and marks the job for the appropriate restart processing. The job is not required to be executing on the member where the command was issued. If the job is not executing, the command has no effect.

Authority Required

This command requires job and system 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 control 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 wish to restart a job, but do not want it to execute at this time, first hold the job using the $H command and then issue the $E command.
  • If you wish to cancel the current execution of the job, you should follow the $E command with the $C, MVS CANCEL or MVS REPLY command.
  • The $E command does not honor the restart parameter on the /*JOBPARM JECL statement or on the JOBCLASS initialization statement.
  • When a job is restarted, all non-spin SYSOUT data sets created during the previous execution are deleted.
  • A job can be put into HELD status if it is restarted (using $E command) while being transmitted. For Job transmitters, any failure other than trying to acquire the matching JR device on the other side will result in the job being held. Jobs that are held must then be activated with a $A command.
  • If the Step parameter is specified, the target job is required to have a journaled data set. Otherwise, the command will fail.

Scope

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

Context

HASCSCAN and HASPSXD.

Messages

The $HASP890 message indicates the specified job is queued for re-execution.

The $HASP003 message indicates any errors.

Examples

 1  $e j2-5

  JOB00002  $HASP890 JOB(MYJOB)
  $HASP890 JOB(MYJOB)     STATUS=(EXECUTING/IBM1),CLASS=A,
  $HASP890                PRIORITY=9,SYSAFF=(IBM1),HOLD=(NONE)
  JOB00003  $HASP890 JOB(MYJOBA)
  $HASP890 JOB(MYJOBA)    STATUS=(EXECUTING/IBM1),CLASS=A,
  $HASP890                PRIORITY=9,SYSAFF=(ANY),HOLD=(NONE)
  JOB00004  $HASP890 JOB(MYJOBB)
  $HASP890 JOB(MYJOBB)    STATUS=(EXECUTING/IBM2),CLASS=A,
  $HASP890                PRIORITY=9,SYSAFF=(IBM2),HOLD=(NONE)
  JOB00005  $HASP890 JOB(MYJOBC)
  $HASP890 JOB(MYJOBC)    STATUS=(EXECUTING/IBM1),CLASS=A,
  $HASP890                PRIORITY=9,SYSAFF=(IBM1),HOLD=(NONE)

JES2 restarts jobs 2, 3, 4, and 5 after they complete execution.

 2   $e j1-*,jm=inf*

  JOB00215  $HASP890 JOB(INFLOOP)
  $HASP890 JOB(INFLOOP)   STATUS=(EXECUTING/IBM1),CLASS=A,
  $HASP890                PRIORITY=9,SYSAFF=(IBM1),HOLD=(NONE)
  JOB00220  $HASP890 JOB(INFSPIN)
  $HASP890 JOB(INFSPIN)   STATUS=(EXECUTING/IBM1),CLASS=A,
  $HASP890                PRIORITY=9,SYSAFF=(IBM1),HOLD=(NONE)

JES2 restarts jobs, beginning with job 1 through the highest-numbered job, whose name begins with the characters INF.

 3   $E J124,STEP

JOB00124  $HASP890 JOB(MYJOB)
          $HASP890 JOB(MYJOB)    STATUS=(EXECUTING/IBM1),CLASS=A,
          $HASP890               PRIORITY=9,SYSAFF=(IBM1),HOLD=(NONE)

JES2 marks job 124 for re-execution after the current step completes.

 4  $ej(*),jc=*:client_xyzjob*

JOB00129  $HASP890 JOB(STATUSB2)                                        C 
$HASP890 JOB(STATUSB2)  STATUS=(EXECUTING/IBM1),CLASS=A,                  
$HASP890                PRIORITY=9,SYSAFF=(ANY),HOLD=(NONE)               

JES2 restarts any batch job with a job correlator user portion starting with CLIENT_XYZJOB.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014