Purpose
The Change Primary Group (CHGPGP) command changes the primary group from one user to another. The owner's and other user's private authorities to the object do not change.
For more information about integrated file system commands, see Integrated File System Introduction in the Information Center.
Restrictions:
Required Parameters
primary-group: Specify the name of the user who is to be the new primary group.
*NONE: The object does not have a primary group.
Optional Parameters
*OLDPGP: The new primary group has the authority that the old primary group had to the object.
*PRIVATE: The new primary group has the private authority that the user has to the object. If the user that is the new primary group does not have private authority to the object, the new primary group has no authority to the object.
*RWX: The new primary group has object operational and all of the data authorities to the object.
*RX: The new primary group has object operational and data read and execute authorities to the object.
*RW: The new primary group has object operational and data read, add, update, and delete authorities to the object.
*WX: The new primary group has object operational and data add, update, delete, and execute authorities to the object.
*R: The new primary group has object operational and data read authorities to the object.
*W: The new primary group has object operational and data add, update, and delete authorities to the object.
*X: The new primary group has object operational and data execute authorities to the object.
*EXCLUDE: The new primary group has exclude authority to the object.
*NONE: The new primary group does not have any of the data authorities to the object.
*NONE: None of the other object authorities (existence, management, alter, or reference) are given to the new primary group. If *OLDPGP, *PRIVATE, or *EXCLUDE are specified for the DTAAUT parameter, this value must be specified.
*ALL: All of the other object authorities (existence, management, alter, and reference) are given to the new primary group.
You can specify a maximum of four of the following values:
*OBJEXIST: The new primary group has object existence authority to the object.
*OBJMGT: The new primary group has object management authority to the object.
*OBJALTER: The new primary group has object alter authority to the object.
*OBJREF: The new primary group has object reference authority to the object.
*YES: The authorities for the current primary group are revoked when the primary group is changed to the other user.
*NO: The authorities for the current primary group become a private authority when the primary group is changed to the other user.
*NO: The primary group of the object, not the symbolic link to the object, is changed.
*YES: If the object whose primary group is changing is a symbolic link, the primary group for the symbolic link is changed instead of changing the primary group of the object that the symbolic link points to.
Example for CHGPGP
CHGPGP OBJ('/QSYS.LIB/USERLIB.LIB/PROGRAM1.PGM')
NEWPGP(ANN)
This command changes the primary group of the program named PROGRAM1, located in the user library named USERLIB, to the group named ANN. The new primary group will have the same authority as the old primary group. The old primary group's authority is revoked.
Error messages for CHGPGP
*ESCAPE Messages
| [ Information Center Home Page | Feedback | Back to main CL topic ] | [ Legal | AS/400 Glossary ] |