Description

Syntax

Name field

Specify the grpname field that was specified on the corresponding JOBGROUP statement. This value is required and is checked against the grpname from the JOBGROUP statement. If they are not the same, the JOBGROUP is in error.

Operation field

The operation field consists of the characters ENDGROUP and must be preceded and followed by at least one blank. It can begin in any column.

Comments field

The ENDGROUP statement has no parameters.

Location in the JCL

An ENDGROUP statement must be matched with a JOBGROUP statement of the same name.

Error on ENDGROUP statement

If the system finds an error on the ENDGROUP statement, an HASP1111 message is issued which describes the error. See z/OS JES2 Messages.

Examples of ENDGROUP statements

//MULTI    JOBGROUP            JOBGROUP describes a group of dependent jobs
//B        GJOB                Job within the group
//C        GJOB                Job within the group
//A        GJOB                A runs before B when ...
//           BEFORE NAME=B,     BEFORE is positioned after a GJOB and describes its
//            WHEN=(RC=0)      dependency to another named job
//           BEFORE NAME=C,    A runs before C when ...
//            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