ENDGRPJOB (End Group Job)

ENDGRPJOB Command syntax diagram

 

Purpose

The End Group Job (ENDGRPJOB) command ends a single job in a group and resumes another job in the group. (Issue the Sign Off (SIGNOFF) command to end all jobs in a group.) The user can specify the following:

Note: The job that issues the ENDGRPJOB command can only end itself or some other job in the group to which this job belongs. To end a job outside the group, the END Job (ENDJOB) command must be used.

 

Optional Parameters

GRPJOB
Specifies the group job name of the job that is ended.

*: This special value ends the group job that issued the ENDGRPJOB command.

group-job-name: Specify the group job name of the job that is ended.

RSMGRPJOB
Specifies the group job name of the job that is to be 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 group job most recently active is resumed.

group-job-name: Specify the group job name of the job that gains control after the active job in the group ends.

LOG
Specifies whether the job log of the ending group is spooled to an output queue.

When the only job in a group is ending, one of two situations can occur:

  • The ending group job is part of a secondary job pair. In this case, the other job in the secondary job pair is resumed, and control is passed back to that job.
  • The ending group job is not part of a secondary job pair. In this case, the sign-on display is shown at the work station (if the work station entry for the work station device in the subsystem specifies *SIGNON).

*NOLIST: The information in the job log is deleted.

*LIST: The information in the job log is spooled to an output queue.

Examples for ENDGRPJOB

Example 1: Ending Group Job that Issued Command

ENDGRPJOB  GRPJOB(*)  LOG(*PRINT)  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(*PRINT)

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.

Error messages for ENDGRPJOB

*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.