Description
Syntax
|
The GJOB statement consists of the characters // in columns 1 and 2 and four fields: name, operation (GJOB), parameter, and comments. Do not code comments if the parameter field is blank. |
Name field
- Each gjobname must be unique.
- The gjobname must begin in column 3.
- The first character must be alphabetic or national ($, #, @).
- The gjobname is 1 through 8 alphanumeric or national ($, #, @) characters.
- The gjobname must be followed by at least one blank.
- gjobnames must be unique within a job group, gjobnames, job set names, SJOB names, and job group names all share the same namespace.
The gjobname identifies the name of a job that is part of the job group being defined. This name must match the name of a job that is submitted (that has a SCHEDULE statement identifying this job group) after the job group is defined.
Operation field
The operation field consists of the characters GJOB and must be preceded and followed by at least one blank. It can begin in any column.
Parameter field
A GJOB statement has one keyword parameter and no positional parameters.
Keyword Parameters: A GJOB statement can contain the following keyword parameter.
- FLUSHTYP=ALLFLUSH|ANYFLUSH
- This job is flushed if all its parent jobs are flushed (ALLFLUSH) or if any one of its parent jobs are flushed (ANYFLUSH). The default is ALLFLUSH.
Comments field
The comments field follows the parameter field after at least one intervening blank space. If you do not code any parameters on a GJOB statement, do not code any comments.
Location in the JCL
A GJOB statement is only valid within a job group context. It cannot be located between a JOBSET and ENDSET statements.
Error on GJOB statement
If the system finds an error on the GJOB statement, an HASP1116 message is issued which describes the error. See z/OS JES2 Messages for more information about the message.
Examples of GJOB statements
//MULTI JOBGROUP JOBGROUP describes a group of dependent jobs
//A GJOB GJOB describes a job in a group
//B GJOB
// AFTER NAME=A, AFTER is positioned after a GJOB and describes its
// WHEN=(RC=0) dependency to another named job
//C GJOB
// AFTER NAME=A,
// WHEN=(RC=4) WHEN= describes a condition associated with the dependency
//D GJOB
// AFTER NAME=B
// AFTER NAME=C
//MULTI ENDGROUP ENDGROUP marks the end of the job group definition