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


$S Job - Initiate a batch job into execution

z/OS JES2 Commands
SA32-0990-00

Function

Start of changeTo initiate a batch job into JES or WLM job class execution.End of change

Use this command to initiate a job immediately instead of letting it wait on the execution queue for normal selection by an initiator.

Note:
  1. The $SJ command, when issued on a member where the $PXEQ command has been run, overrides the $PXEQ command on that member.
  2. Start of changeThe $SJ command, when issued on a member where the $PXEQ command has been run, starts a WLM initiator for the JES class that is specified in the //JOB card, or if there are no initiators active for that JES class.End of change

Syntax

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

>--+-Job-+--+-nn--+---------------------------------------------+----------------------------------------------------+-><
   '-J---'  |     '- ---+-mm-+--| Selection limiting keywords |-'                                                    |   
            |           '-*--'                                                                                       |   
            +-'--job--'----------------------------------------------------------------------------------------------+   
            |    .-,--------------------------------------------------------------------------------------------.    |   
            |    V                                                                                              |    |   
            '-(----+-+-nn-+--| Selection limiting keywords |--+---------------------------------------------+-+-+--)-'   
                   | '-*--'                                   '- ---+-mm-+--| Selection limiting keywords |-' |          
                   |                                                '-*--'                                    |          
                   +-job--------------------------------------------------------------------------------------+          
                   +-'--job--'--------------------------------------------------------------------------------+          
                   '-*--| Selection limiting keywords |-------------------------------------------------------'          

Selection limiting keywords

|--+------------------------------------------+-----------------|
   '-,--+-+---+--JC------+--=--job correlator-'   
        | '-/-'          |                        
        '-+---+--JOBCORR-'                        
          '-/-'                                   

Parameters

job
A 1-8 alphanumeric character job identifier. Only a single job can be submitted. Start of changeIf you also specify a job correlator parameter (JOBCORR), which identifies a unique job, then this parameter can contain wildcard characters for selecting a subset of job names that match this combination of characters (mask). For additional information, refer to Using wildcards.End of change
'job'
The name of the job that is to be started. This name must appear as coded on the JOB statement and must be enclosed within apostrophe characters. If more than one job exists with this name, no action is taken.
nn
A batch job to be started. Only a single job can be submitted. Start of changeIf you also specify a job correlator parameter (JOBCORR), which identifies a unique job, then this parameter can contain wildcard characters for selecting a range of batch jobs that can be used to select a subset of jobs. For additional information, refer to Using wildcards.End of change
Start of changeJC|JOBCORR=job correlatorEnd of change
Start of changeSpecifies a combination of characters, 1-64 alphanumeric, special (colon : or period .) and wildcard, that can be used to select a job that has a matching job correlator. For a description of wildcard characters, refer to Using wildcards. If you specify a job correlator with the $SJ command, the specification must return a single job.End of change

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

The $SJ command will be rejected if one or more of the following conditions exist:
  1. Combining any of the following affinities with the active members results in no eligible members:
    1. Job-affinity
    2. SCHENV-affinity
    3. Multi-Level-Security (MLS) affinity
    4. JOBCLASS affinity (QAFF) - see the $P XEQ exception below
    5. Service class affinity (QAFF) - see the $P XEQ exception below
  2. Another job with a duplicate jobname is currently executing, the installation option for JOBDEF is DUPL_JOB=DELAY, and the JOBCLASS has a specification of DUPL_JOB=DELAY (the default).
  3. SPOOL volumes that the job requires are not available.
  4. The job is already busy.
  5. The job is not awaiting execution.
  6. The job is held for ARM restart.
  7. Exit 49 return code is "not selectable."
  8. The JOBCORR filter value supplied is less than 31 characters long or a wildcard character ("*" or "?") appears in the first 31 characters of the JOBCORR value.
In addition, the following actions apply only if a $P XEQ command is in effect on the member that originated the $SJ command:
  • The $P XEQ command is ignored for purposes of processing the specified job. The $P XEQ command is ignored only for the member that originated the $S J command.
  • The QAFF for the service class (if any) and the QAFF for the job class will be forced to temporarily include the member that originated the $SJ command.

Scope

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

Messages

The $HASP890 message is issued to indicate that the job can be started.

The $HASP003 message is issued if no jobs are found in the specified range that are eligible to be started.

The $HASP361 message is issued if the job is no longer eligible when the attempt by the initiator to select the job fails.

Example

 1   $s j5

  JOB00005  $HASP890 JOB(STARTJOB)
  $HASP890 JOB(STARTJOB)  STATUS=(AWAITING EXECUTION),CLASS=A,
  $HASP890                PRIORITY=1,SYSAFF=(IBM1),HOLD=(NONE)

Job 5 (STARTJOB) is initiated into execution.

 2  $sj(*),jc=J0000151POK.....C88BDE5E.......:*

  JOB00151  $HASP890 JOB(STATUSB3)                                        C           
  $HASP890  JOB(STATUSB3)  STATUS=(AWAITING EXECUTION),CLASS=A,                        
  $HASP890                PRIORITY=9,SYSAFF=(ANY),HOLD=(NONE)                         
- JOB00151  ICH70001I IBMUSER  LAST ACCESS AT 17:36:00 ON WEDNESDAY, 
            OCTOBER 19, 2011 
- JOB00151  $HASP373 STATUSB3 STARTED - WLM INIT  - SRVCLASS DISCRETN - 
            SYS IBM1      

JES2 initiates into execution the batch job that exactly matches the supplied job correlator system portion (batch job 151).

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014