Where allowed to run: Interactive environments (*INTERACT *IPGM *IREXX *EXEC) Threadsafe: No |
Parameters Examples Error messages |
The End Group Job (ENDGRPJOB) command ends a single job within a group and resumes another job within the group. You can specify the following:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
GRPJOB | Group job | Name, * | Optional, Positional 1 |
RSMGRPJOB | Group job to be resumed | Name, *PRV | Optional |
LOG | Job log | *NOLIST, *LIST | Optional |
Top |
Specifies the group job name of the job being ended.
Top |
Specifies the group job name of the job that is resumed after the active job in the group has ended. This parameter is valid only when the job that issues this command is ending itself.
Top |
Specifies whether to produce the job log for the ending group job.
Top |
Example 1: Ending Group Job that Issued Command
ENDGRPJOB GRPJOB(*) LOG(*LIST) RSMGRPJOB(GROUPJOB1)
This command ends the job that is currently running. Its job log is spooled to an output file for printing. When the job completes running, group job GROUPJOB1 becomes the active job in the group.
Example 2: Printing Output of Ended Job
ENDGRPJOB GRPJOB(GROUPJOB2) LOG(*LIST)
Assume that the job issuing the ENDGRPJOB command is group job GROUPJOB1, which wants to end GROUPJOB2. Group job GROUPJOB2 ends. Its job log is spooled to an output file for printing.
Example 3: Ending a Job That's Part of a Secondary Job Pair
ENDGRPJOB GRPJOB(*) LOG(*NOLIST)
Assume that the job issuing the ENDGRPJOB command is the only job in the group and is part of a secondary job pair. The job issuing the command ends. The job's job log is not spooled to an output file. When the job ends, the other job in the secondary job pair is resumed.
Top |
*ESCAPE Messages
Top |