CL Command Reference - ENDGRPJOB

CL Command List > ENDGRPJOB Reference

Description:

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


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.