Change Group Attributes (CHGGRPA)

Where allowed to run: Interactive environments (*INTERACT *IPGM *IREXX *EXEC)
Threadsafe: No
Parameters
Examples
Error messages

The Change Group Attributes (CHGGRPA) command changes the group attributes of an interactive job. The CHGGRPA command must be used to change an interactive job into a group job before a Transfer to Group Job (TFRGRPJOB) command can be used. The following attributes can be changed:

More information about group jobs is in the Work Management information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.

Restrictions:

  1. To use this command, you must have:
    • use (*USE) authority to the message queue (MSGQ) and execute (*EXECUTE) authority to the library that contains that message queue.
Top

Parameters

Keyword Description Choices Notes
GRPJOB Group job Name, *SAME, *NONE Optional, Positional 1
MSGQ Message queue Single values: *SAME, *NONE
Other values: Qualified object name
Optional, Positional 2
Qualifier 1: Message queue Name
Qualifier 2: Library Name, *LIBL, *CURLIB
TEXT Text 'description' Character value, *SAME, *BLANK Optional
Top

Group job (GRPJOB)

Specifies the group job name assigned to the job.

*SAME
The group job name does not change.
*NONE
The only active job in a group is made a non-group interactive job, the group data area (*GDA) is deleted, and the group message queue (if there is one) is disassociated from the group; the mode of the group message queue, however, does not change.
name
Specify the group job name that is assigned to the interactive job issuing this command. This causes the job to become a group job and also causes the group data area (*GDA) to be created. This character type data area is 512 bytes long, and at first, it is filled with blanks. Specifying a group job name is valid only when the job is not a group job. Once a job is assigned a group job name, that name cannot be changed (except to set it to *NONE if it is the only active job in the group).
Top

Message queue (MSGQ)

Specifies the name of a message queue that is associated with a group. This message queue must exist, but it does not necessarily need to be allocated to the job at the time this command is issued.

Single values

*SAME
The message queue associated with the group does not change.
*NONE
No message queue is associated with the group. If a message queue is associated with the group, it is disassociated from the group (but the mode does not change).

Qualifier 1: Message queue

name
Specify the name of the message queue that is associated with the group.

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 message queue is located.
Top

Text 'description' (TEXT)

Specifies up to 50 characters of text that describe the group job. This text appears on the Group Job Selection Display for the Transfer to Group Job (TFRGRPJOB) Command.

*SAME
The text does not change.
*BLANK
No text is specified.
character-value
Specify no more than 50 characters of text, enclosed in apostrophes.
Top

Examples

Example 1: Changing an Interactive Job to a Group Job

CHGGRPA   GRPJOB(GROUPJ1)  MSGQ(QGPL/GRPMSGQ)

An interactive job is first changed to a group job before it is allowed to create other group jobs at the work station. This command changes a work station job into a group job with the group job name GROUPJ1; a message queue is associated with the group and (as long as it is in break or notify mode in the job issuing a TFRGRPJOB or End Group Job (ENDGRPJOB) command) is allocated to the active job in the group. The group data area (*GDA) is also created.

Example 2: Changing a Group Job to a Nongroup Job

CHGGRPA   GRPJOB(*NONE)

Assume that the job in the previous example issues this command. Assume also that the job is the only active job in the group. Group job GROUPJ1 is changed into a nongroup, interactive job. The group job name is removed, and the group data area (*GDA) is deleted. The change from a group job into a nongroup job occurs only if it is the only active job in the group.

Top

Error messages

*ESCAPE Messages

CPF1305
Changing group job name not allowed.
CPF1306
Specifying GRPJOB(*NONE) not allowed at this time.
CPF1307
Group job &1 already belongs to this group.
CPF1308
Parameters that do not agree were found.
CPF1309
Subsystem cannot complete the &1 command.
CPF1312
Change group attribute request not valid; job not group job.
CPF1313
Value &1 for parameter &2 not allowed name.
CPF1316
&1 in &2 not allowed as group message queue.
CPF1317
No response from subsystem for job &3/&2/&1.
CPF1328
No authority to use queue &2 in &3.
CPF1329
Message queue &1 in &2 not found.
CPF1330
Message queue &1 in &2 not available.
CPF1331
&1 in &2 not allowed as group message queue.
CPF1351
Function check occurred in subsystem for job &3/&2/&1.
Top