Where allowed to run:
|
Parameters Examples Error messages |
The Retrieve Group Attributes (RTVGRPA) command retrieves information about the group in which the job that issued the command belongs. The following attributes can be retrieved:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
GRPJOB | CL var for GRPJOB (10) | Character value | Optional, Positional 1 |
GRPJOBL | CL var for GRPJOB list (1056) | Character value | Optional, Positional 2 |
GRPJOBCNT | CL var for GRPJOBCNT (3 0) | Decimal number | Optional, Positional 3 |
MSGQ | CL var for MSGQ (10) | Character value | Optional |
MSGQLIB | CL var for MSGQLIB (10) | Character value | Optional |
PRVGRPJOB | CL var for PRVGRPJOB (16) | Character value | Optional |
CTLCDE | CL var for CTLCDE (3 0) | Decimal number | Optional |
Top |
Specifies the name of the CL variable that receives the group job name of the job. The variable must be a character variable with a minimum length of 10 characters. If the group job name has fewer characters than the variable allows, the value is padded on the right with blanks.
Top |
Specifies the name of the CL variable that receives the list of jobs in the group. Each entry contains the job's group job name (10), job number (6), and the 50 characters of descriptive text. The maximum number of entries in the variable is 16. The entries are ordered by most recently active job. The variable must be a character variable with a minimum length of 1056 characters. If the group job list has fewer characters than the variable allows, the value is padded on the right with blanks.
Top |
Specifies the CL variable that receives the count of active jobs in the group. The CL variable must be a three-position decimal variable with no decimal positions. The CL variable contains the number of non-blank entries in the group job list. The count includes all of the active jobs in the group. Jobs that have not completely ended (jobs that have been canceled) are not counted.
Top |
Specifies the name of the CL variable that receives the group message queue name. This variable must be a character variable with a minimum length of 10 characters. If the message queue name has fewer characters than the variable allows, the value is padded on the right with blanks. If there is no message queue associated with the group, the CL variable is set to the special value of *NONE.
Top |
Specifies the name of the CL variable that receives the name of the library that contains the group message queue. This variable must be a character variable with a minimum length of 10 characters. If the library name has fewer characters than the variable allows, the value is padded on the right with blanks. If there is no message queue associated with the group, the CL variable is set to blanks.
Top |
Specifies the name of the CL variable that receives the group job name and job number of the previously active job in the group. The variable must be a character variable with a minimum length of 16 characters. If the group job name has fewer characters than the variable allows, the value is padded on the right with blanks. If there is no previously active job in the group, the group job name portion of the CL variable is set to the special value of *NONE, and the job number portion of the CL variable is set to blanks. The CL variable is returned in the following format:
Group-job-name CHAR(10) Job-number CHAR(6)
Top |
Specifies the name of the CL variable that receives information about why the active job in the group has gained control. The CL variable must be a three-position decimal variable with no decimal positions. The following control codes (and their meanings) are possible:
Top |
Assume jobs 030001/QUSER/WORKST01 and 030002/QUSER/WORKST01 are group jobs with group job names GROUPJ1 and GROUPJ2, respectively. Also assume that message queue QGPL/GROUPMSGQ is associated with the group. If group job GROUPJ1 has just issued the TFRGRPJOB command to transfer to group job GROUPJ2, and GROUPJ2 called the following CL program:
PGM Example
DCL VAR(&GRPJOBN) TYPE(*CHAR) LEN(10) DCL VAR(&GRPJOBL) TYPE(*CHAR) LEN(1056) DCL VAR(&GRPCOUNT) TYPE(*DEC) LEN(3 0) DCL VAR(&MSGQNAME) TYPE(*CHAR) LEN(10) DCL VAR(&MSGQLIB) TYPE(*CHAR) LEN(10) DCL VAR(&PRVJOB) TYPE(*CHAR) LEN(16) DCL VAR(&CTLCODE) TYPE(*DEC) LEN(3 0) RTVGRPA GRPJOB(&GRPJOBN) GRPJOBL(&GRPJOBL) + GRPJOBCNT(&GRPCOUNT) MSGQ(&MSGQNAME) + MSGQLIB(&MSGQLIB) PRVGRPJOB(&PRVJOB) + CTLCDE(&CTLCODE)
The contents of the CL variables returned are as follows:
&GRPJOBN: GROUPJ2 &GRPJOBL: GROUPJ2 030002 50 characters of text for this group job... GROUPJ1 030001 50 characters of text for this group job...
Fourteen more entries, full of blanks
&GRPCOUNT: 002 &MSGQNAME: GROUPMSGQ &MSGQLIB: QGPL &PRVJOB: GROUPJ1 030001 &CTLCODE: 010
Top |
*ESCAPE Messages
Top |