Command reference / job

TFRGRPJOB

Transfer to Group Job

The Transfer to Group Job (TFRGRPJOB) command suspends the job that issued the TFRGRPJOB command, and the group job specified by the Group job (GRPJOB) parameter is resumed (if it already exists) or is created (if it does not exist). In both cases, control is transferred to the job specified by the GRPJOB parameter. The job issuing the TFRGRPJOB command remains suspended until control is passed back to it and the job is resumed.

Allowed environments: *INTERACT, *IPGM, *IREXX, *EXEC. Positional parameters: 2.

Restrictions

Parameters

GRPJOB Group job

Specifies the group job to which control is transferred.

Type
*NAME
Required
No
Default
*PRV
Length
10
Case
Uppercase

Suggested / special values: *PRV, *SELECT

*PRV
Control is transferred to the previously active job in the group. If the previously active job no longer exists, then the most recently active job in the group is resumed. This special value is valid only if there is another group job in the group.
*SELECT
The Group Job Selection display is shown. You can choose which group job to transfer to or create a new group job and transfer to it.
name
Specify the name of the group job to which control is transferred.

INLGRPPGM Initial group program

Specifies the qualified name of the job's first group program. This parameter only has meaning when a group job is created. If the group job being transferred to already exists, this parameter is ignored.

Type
*QUAL
Required
No
Case
Uppercase
Qualifier 1: Initial group program: name
Specify the name of the job's first group program.
Qualifier 2: Library: name
Specify the library where the program is located.
*LIBL
All libraries in the thread's library list are searched until a match is found.
*CURLIB
The current library for the thread is used to locate the object. If no library is specified as the current library for the thread, the QGPL library is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Initial group program Initial group program

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

SPCENV Special environment

Specifies the environment in which the group job starts. This parameter is valid only when this command creates a group job. If control is transferring to an existing group, this parameter is ignored.

Type
*CHAR
Required
No
Default
*DFT
Length
10
Case
Uppercase

Allowed values: *DFT, *INLGRPPGM, *S36, *NONE

*DFT
The group job starts in the environment in which the command is run. The group job starts in the System/36 environment if one of the following is true: The System/36 environment is active in the job in which this command is running The user profile specifies that the user runs in the System/36 environment, and the first program called in the group job is QCMD.
*INLGRPPGM
The new group starts in the environment determined by the first group called in the group job. If the first group program is QCMD, the special environment value in the user profile is used to determine the environment.
*S36
The new group starts in the System/36 environment.
*NONE
The new group does not start in any special environment.

RSTDSP Restore display

Specifies whether data being shown at a display device by this display file is saved at the time the file is suspended (made temporarily inactive) so that a different display file can be used to show different data on the same device.

Type
*CHAR
Required
No
Default
*NO
Length
4
Case
Uppercase

Allowed values: *NO, *YES

*NO
The data being shown by this file is not saved when the file is suspended.
*YES
The data being shown when the file is suspended is saved so it can be restored to the display of the device when the file is used again.

TEXT Text 'description'

Specifies text that describes the group job. This parameter only has meaning when a group job is created. If the group job being transferred to already exists, this parameter is ignored.

Type
*CHAR
Required
No
Default
*BLANK
Length
50
Case
Uppercase

Suggested / special values: *BLANK

*BLANK
The text is all blanks.
character-value
Specify a maximum of 50 characters of text, enclosed in apostrophes if necessary.

Examples

TFRGRPJOB GRPJOB(GROUPJ1) INLGRPPGM(QGPL/PROGRAM1)

This command suspends running of the current job. If group job GROUPJ1 already exists, it is resumed at the point where it was suspended (the next high-level language command following the TFRGRPJOB request). If GROUPJ1 does not exist, it is created and runs PROGRAM1 in library QGPL.

IBM command documentation

Generated from os/cl/catalog/TFRGRPJOB.json and os/cl/help/TFRGRPJOB.json.