Transfer to Group Job (TFRGRPJOB)
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.
Restrictions:
- To use this command, you must have:
- use (*USE) authority to the initial group program and execute (*EXECUTE) authority to the library that contains that program.
Notes:
- The job associated with an active subsystem can only find objects that exist in the system auxiliary storage pool (ASP) or in a basic user ASP. Therefore, objects that are referenced by this command should exist in the system ASP or in a basic user ASP.
Keyword |
Description |
Choices |
Notes |
GRPJOB |
Group job |
Name, *PRV, *SELECT |
Optional, Positional 1 |
INLGRPPGM |
Initial group program |
Qualified object name |
Optional, Positional 2 |
Qualifier 1: Initial group program |
Name |
Qualifier 2: Library |
Name, *LIBL, *CURLIB |
SPCENV |
Special environment |
*DFT, *INLGRPPGM, *S36, *NONE |
Optional |
RSTDSP |
Restore display |
*NO, *YES |
Optional |
TEXT |
Text 'description' |
Character value, *BLANK |
Optional |
Group job (GRPJOB)
Specifies the group job to which control is transferred.
- *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.
Initial group program (INLGRPPGM)
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.
Qualifier 1: Initial group program
- name
- Specify the name of the job's first group program.
Qualifier 2: Library
- *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.
- name
- Specify the library where the program is located.
Special environment (SPCENV)
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.
- *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.
Restore display (RSTDSP)
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.
- *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 'description' (TEXT)
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.
- *BLANK
- The text is all blanks.
- character-value
- Specify a maximum of 50 characters of text, enclosed in apostrophes if necessary.
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 group job GROUPJ1 does not exist, group job GROUPJ1 is created and runs the program PROGRAM1 in library QGPL.
*ESCAPE Messages
- CPF1E15
- Problem occurred while calling Operational Assistant.
- CPF1310
- Request to transfer to group job failed with reason code &1.
- CPF1313
- Value &1 for parameter &2 not allowed name.
- CPF1314
- Value &1 for parameter &2 not allowed.
- CPF9871
- Error occurred while processing.