This is part of the Heirloom Computing Elastic Batch Platform forum on paas.heirloomcomputing.com.
IBM z/OS JES2 V2R2 Job Execution Control language is used to define Job Groups which describe the interrelationships of jobs for scheduling purposes. For example the following JEC job deck describes the job group MYGROUP:
//* DEPENDENCY NETWORK:
//*
//* JOBC
//* |
//* JOBE===JOBA
//* |
//* JOBX
//*
//*
//*-----------------------------
//MYGROUP JOBGROUP
//*
//JOBA GJOB
//*
//JOBE GJOB
// CONCURRENT NAME=JOBA
//*
//JOBC GJOB
// BEFORE NAME=JOBA
//*
//JOBX GJOB
// AFTER NAME=JOBA
//*
//MYGROUP ENDGROUP
Then the following sequence of JCL jobs with the SCHEDULE statement refer to it. Note this example will fail if the jobs are not run under control of the Job Group because dependent datasets may not exist.
//* :....1....:....2....:....3....:....4....:....5....:....6....:....7.
//* Sequence of jobs running under control of JOBGROUP=MYGROUP//JOBX JOB (22,DEPT22,22IKJ22),'job group',CLASS=B,MSGCLASS=A,
// MSGLEVEL=(2,2),NOTIFY=USERID
// SCHEDULE JOBGROUP=MYGROUP
//CREATEA EXEC PGM=IEFBR14,
// PARM='SYSOUT=CREATED+BY+JOBX'
//SYSOUT DD DISP=(NEW,CATLG),DSN=JOBX.DAT
//DEPEND1 DD DISP=(SHR,KEEP),DSN=JOBA.DAT
//DEPEND2 DD DISP=(SHR,KEEP),DSN=JOBC.DAT
//DEPEND3 DD DISP=(SHR,KEEP),DSN=JOBE.DAT//JOBA JOB (22,DEPT22,22IKJ22),'job group',CLASS=B,MSGCLASS=A,
// MSGLEVEL=(2,2),NOTIFY=USERID
// SCHEDULE JOBGROUP=MYGROUP
//CREATEA EXEC PGM=IEFBR14,
// PARM='SLEEP=30 SYSOUT=CREATED+BY+JOBA'
//SYSOUT DD DISP=(NEW,CATLG),DSN=JOBA.DAT
//DEPEND1 DD DISP=(SHR,KEEP),DSN=JOBC.DAT//JOBC JOB (22,DEPT22,22IKJ22),'job group',CLASS=B,MSGCLASS=A,
// MSGLEVEL=(2,2),NOTIFY=USERID
// SCHEDULE JOBGROUP=MYGROUP
//CREATEA EXEC PGM=IEFBR14,
// PARM='SYSOUT=CREATED+BY+JOBC'
//SYSOUT DD DISP=(NEW,CATLG),DSN=JOBC.DAT
//JOBE JOB (22,DEPT22,22IKJ22),'job group',CLASS=B,MSGCLASS=A,
// MSGLEVEL=(2,2),NOTIFY=USERID
// SCHEDULE JOBGROUP=MYGROUP
//CREATEA EXEC PGM=IEFBR14,
// PARM='SLEEP=30 SYSOUT=CREATED+BY+JOBE'
//SYSOUT DD DISP=(NEW,CATLG),DSN=JOBE.DAT
//DEPEND1 DD DISP=(SHR,KEEP),DSN=JOBC.DAT
All jobs referenced in the group must be submittied and ready to run for any part of the job group to start. If duplicates of jobs are submitted, one is chosen to be part of the group at the time the group becomes active. When the entire group of jobs finish, then the group will become active again when a new set of jobs are submitted.
Job Groups are defined by submitting decks to EBP where a job class of type JEC has been defined at at least one initiator is available to process the definition. Definitions persist EBP shutdown / start-up. Groups can be displayed as an XML representation of the JEC dec with the LIST service. To delete a group, submit a JEC job deck which contains only a JOBGROUP and ENDGROUP of the same name (empty job group).
The implementation of the IBM z/OS JES2 Job Execution Control syntax accepted EBP is described below in extended Bachus-Naur form and syntax "railroad" diagrams.
Rules
- job
- jobgroup
- groupcards
- jobsets
- setcards
- gjob
- modifiers
- commentcard
- jobgroupcard
- jobgroupname
- jgpositional
- accounting
- programmer
- jgkeyword
- endgroupcard
- jobsetcard
- jobsetid
- jskeyword
- endsetcard
- sjobcard
- gjobcard
- gjobcardid
- gjkeyword
- aftercard
- after
- beforecard
- before
- backeyword
- morenames
- action
- concurrentcard
- concurrent
- cckeyword
- comment
- ifcontin
- ifexpr
- andorexpr
- reloper
- relexpr
- booloper
- anyexpr
- quotedstring
- anything
- idres
- idnonexprres
- idresint
- idresvar
- idresintvar
- intvar
- intidres
- idintvar
- ID
- variable
- comma
- reserved
- nonexprreserved
- exprreserved
- INT
- HEX
- NEWLINE
- WS
- SPECIAL
- INTL
Rules
-
job Top
A JES2 Execution Control deck includes JEC statements only https://www-01.ibm.com/support/knowledgecenter/SSLTBW_2.2.0/com.ibm.zos.v2r2.ieab600/jes2zone.htm
Text notation:
Visual notation:
-
jobgroup Top
Text notation:
Visual notation:
-
groupcards Top
Text notation:
Visual notation:
-
jobsets Top
Text notation:
Visual notation:
-
setcards Top
Text notation:
Visual notation:
-
gjob Top
Visual notation:
-
modifiers Top
Text notation:
Visual notation:
-
commentcard Top
Comment cards contain arbitrary comments (Note: starting in column 5).
Visual notation:
-
jobgroupcard Top
Job Group Card defines the begging of a Job Group
Text notation:
Visual notation:
-
jobgroupname Top
Text notation:
jobgroupname : idres ;Visual notation:
-
jgpositional Top
Text notation:
Visual notation:
-
accounting Top
Text notation:
Visual notation:
-
programmer Top
Text notation:
Visual notation:
-
jgkeyword Top
Text notation:
Visual notation:
-
endgroupcard Top
End Job Group Card defines the end of a Job Group
Visual notation:
-
jobsetcard Top
Job Set Card defines a set of jobs within a Job Group
Visual notation:
-
jobsetid Top
Text notation:
jobsetid : idres ;Visual notation:
-
jskeyword Top
Visual notation:
-
endsetcard Top
End Job Set Card defines a ending of a set of jobs within a Job Group
Visual notation:
-
sjobcard Top
Set Job Card specifies a job name within a Job Set
Visual notation:
-
gjobcard Top
Global Job Card specifies a global job name within a Job Group
Visual notation:
-
gjobcardid Top
Text notation:
gjobcardid : idres ;Visual notation:
-
gjkeyword Top
Visual notation:
-
aftercard Top
After Card modifies GJOB and JOBSET cards indicating which jobs they come bafter
Text notation:
Visual notation:
-
after Top
Text notation:
after : AFTER ;Visual notation:
-
beforecard Top
Before Card modifies a GJOB and JOBSET cards indicating which jobs they come before
Text notation:
Visual notation:
-
before Top
Text notation:
before : BEFORE ;Visual notation:
-
backeyword Top
Text notation:
Visual notation:
-
morenames Top
Visual notation:
-
action Top
Visual notation:
-
concurrentcard Top
Concurrent Card modifies a GJOB card indicating which jobs it runs concurrent with
Visual notation:
-
concurrent Top
Text notation:
concurrent : CONCURRENT ;Visual notation:
-
cckeyword Top
Visual notation:
-
comment Top
Most cards may contain comments after white-space (WS) and contain anything other than a new-line (NEWLINE) character up until column 72. A non-blank character in column 72 continues the comment onto the next card
Visual notation:
-
ifcontin Top
Visual notation:
-
ifexpr Top
Visual notation:
-
andorexpr Top
Visual notation:
-
reloper Top
Text notation:
Visual notation:
-
relexpr Top
Text notation:
Visual notation:
-
booloper Top
Visual notation:
-
anyexpr Top
Text notation:
Visual notation:
-
quotedstring Top
Use a quoted string for parameters, datasets, symbolic parameters. Double enclosed apostrophes.
Visual notation:
-
anything Top
Text notation:
Visual notation:
-
idres Top
identifier or reserved word
Visual notation:
-
idnonexprres Top
Text notation:
Visual notation:
-
idresint Top
identifier, reserved word or int
Visual notation:
-
idresvar Top
identifier, reserved word or variable
Visual notation:
-
idresintvar Top
identifier, reserved word, integer or variable
Visual notation:
-
intvar Top
integer or variable
Visual notation:
-
intidres Top
integer possibly followed by an ID or reserved word
Visual notation:
-
idintvar Top
identifier, integer or variable
Visual notation:
-
ID Top
Heirloom Computing EBP Identifiers consist of $, #, @ and A through Z followed by up to 7 of the same. Symbolic Parameters start with &, IDs with embedded & indicate a concatenation of two symbolic parameters.
Text notation:
ID : ('a'..'z'|'A'..'Z'|'$'|'#'|'@') ('a'..'z'|'A'..'Z'|'0'..'9'|'$'|'#'|'@'|'-'|'_')* ;Visual notation:
-
variable Top
Visual notation:
-
comma Top
keyword parameter values that contain comma-separated lists may span lines
Visual notation:
-
reserved Top
Text notation:
Visual notation:
-
nonexprreserved Top
Text notation:
nonexprreserved : ACTION | AFTER | ALLFLUSH | ANYFLUSH | BEFORE | CONCURRENT | ENDGROUP | ENDSET | ERROR | FAIL | FLUSH | FLUSHTYP | GJOB | GROUP | HOLD | JOBGROUP | JOBSET | NAME | NO | ONERROR | OTHERWISE | PASSWORD | SATISFY | SCAN | SCHENV | SJOB | STOP | SUSPEND | SYSAFF | SYSTEM | SECLABEL | TYPE | WHEN | YES ;Visual notation:
-
exprreserved Top
Visual notation:
-
INT Top
Text notation:
INT : ('0'..'9')+ ;Visual notation:
-
HEX Top
Text notation:
HEX : ('0'..'9' | 'a'..'f' | 'A'..'F')+ ;Visual notation:
-
NEWLINE Top
Text notation:
NEWLINE : '\r'? '\n' ;Visual notation:
-
WS Top
Text notation:
WS : (' '|'\t')+ ;Visual notation:
-
SPECIAL Top
SPECIAL token not used but required to define all other chars
Text notation:
SPECIAL : ( '~' | '`' | '!' | '@' | '#' | '$' | '%' | '^' | '&' | '*' | '(' | ')' | '-' | '_' | '+' | '\'' | '"' | '=' | '{' | '}' | '[' | ']' | '|' | ':' | ';' | ',' | '.' | '<' | '>' | '?' | '/' | '\\' | INTL ) ;Visual notation:
-
INTL Top
Text notation:
INTL : . ;Visual notation:
0 Comments