CHGGRPA (Change Group Attributes)

CHGGRPA Command syntax diagram

 

Purpose

The Change Group Attributes (CHGGRPA) command changes the group attributes of a job. The following attributes can be changed:

 

Optional Parameters

GRPJOB
Specifies the group job name assigned to the job in which this CHGGRPA command is used.

*SAME: The value does not change.

*NONE: The only active job in a group is changed to a nongroup 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 disassociated message queue, however, does not change.

group-job-name: Specify the group job name that is assigned to the interactive job in which this command is used. This causes the job to become a group job and also causes the group data area (*GDA) to be created.

Specifying a group job name is valid only when the job is not a group job. Once a group job name is assigned to a job, that name cannot be changed (except by setting it to *NONE if it is the only active job in the group).

When a job becomes a group job by means of the CHGGRPA command, the group data area is created. This character type data area is 512 bytes long, and at first, it is filled with blanks. Jobs in a group may communicate with each other by using the group data area; it is accessible from any of the jobs in the group, but not from outside that group. The group data area is supported on the Change Data Area (CHGDTAARA), Retrieve Data Area (RTVDTAARA), and the Display Data Area (DSPDTAARA) commands by using the special value *GDA.

MSGQ
Specifies the qualified name of a message queue associated with a group.

*SAME: The value does not change.

*NONE: No message queue is associated with the group. If a message queue is currently associated with the group, this value disassociates the message queue from the group, but the mode does not change.

The name of the message queue can be qualified by one of the following library values:

*LIBL: All libraries in the job's library list are searched until the first match is found.

*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.

library-name: Specify the name of the library to be searched.

message-queue-name: Specify the name of the message queue associated with the group. This message queue must exist, but not necessarily be allocated to the job when this CHGGRPA command is issued.

The message queue is available to the active job in the group. If one group job either starts or transfers to another group job, and the message queue is in break or notify mode in the job that is issuing the Transfer Group Job (TFRGRPJOB) command, the message queue is placed in the same mode as that of the group job to which it is transferred. If the message queue is not in break or notify mode in the job that is issuing the TFRGRPJOB command, then no special processing is done for the message queue even though it has been associated with the group.

It is possible to have two groups associated with the same work station when a secondary interactive job exists (the Transfer Secondary Job (TFRSECJOB) command is entered, or option 1 on the system request menu is entered). If two groups are associated with a work station and both groups specify the same message queue, only one of the groups can have the message queue in break or notify mode at a time. For both groups to share the same group message queue, the message queue mode must be set to either the hold mode or to the default mode before the TFRSECJOB command or System Request option 1 is issued.

Note: Work station message queues, and the QHST, QSRV, and QCHG system message queues are not valid for this parameter.

TEXT
Specifies the text that briefly describes the group job. More information is in Commonly used parameters.

Note: This text appears on the Group Job Selection display for the TFRGRPJOB command.

*SAME: The value does not change.

*BLANK: Text is not specified.

'description': Specify no more than 50 characters of text, enclosed in apostrophes.

Examples for CHGGRPA

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.

Additional Considerations

Error messages for CHGGRPA

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