End Group Job (ENDGRPJOB)
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:
- Which job in the group is ended
- Which job in the group gains control (this is valid only when a job is ending itself)
- Whether a job log is created for the job being ended
Top |
Parameters
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 |
Group job (GRPJOB)
Specifies the group job name of the job being ended.
- *
- The group job that issued this command is ended.
- name
- Specify the group job name of the job being ended.
Top |
Group job to be resumed (RSMGRPJOB)
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.
- *PRV
- The most recently active group job is resumed.
- name
- Specify the group job name of the job that is resumed after the active job in the group ends.
Top |
Job log (LOG)
Specifies whether to produce the job log for the ending group job.
- *NOLIST
- The information in the job log is not spooled to an output queue.
- *LIST
- The information in the job log is spooled to an output queue.
Top |
Examples
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 |
Error messages
*ESCAPE Messages
- CPF1309
- Subsystem cannot complete the &1 command.
- CPF1314
- Value &1 for parameter &2 not allowed.
- CPF1317
- No response from subsystem for job &3/&2/&1.
- CPF1322
- The End Group Job command not allowed at this time.
- CPF1323
- Group job &1 not ended; parameters do not agree.
- CPF1324
- Group job &1 not ended; parameters do not agree.
- CPF1325
- Group job &1 not ended; group job &2 does not exist.
- CPF1326
- Group job &1 does not exist.
- CPF1327
- Cannot end group job &1 with ENDGRPJOB.
- CPF1351
- Function check occurred in subsystem for job &3/&2/&1.
Top |