Command reference / sec

CHGOBJPGP

Change Object Primary Group

Changes the primary group of a qualified object and can set its authority. Private authorities held by the owner and by other users are retained.

Allowed environments: *ALL. Positional parameters: 3.

Parameters

OBJ Object

Sets the object that is to have its primary group changed. Note: A library name can be specified to ensure that the correct object has its primary group changed.

Type
*QUAL
Required
Yes
Case
Uppercase
name
Enter the name of the object that is to have its primary group changed to another user.
*LIBL
Look in the thread's library list.
*CURLIB
Look in the current library, falling back to QGPL.
name (library)
Enter the name of the library to be searched.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Object Object

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

OBJTYPE Object type

Sets the object type of the object whose primary group is to be changed. For more information, refer to the OBJTYPE parameter description in "Commonly used parameters: Expanded descriptions" in CL topic collection in the Programming category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.

Type
*CHAR
Required
Yes
Length
10
Case
Uppercase

Allowed values: *ALRTBL, *AUTL, *BNDDIR, *CFGL, *CHTFMT, *CLD, *CLS, *CMD, *CNNL, *COSD, *CRG, *CRQD, *CSI, *CSPMAP, *CSPTBL, *CTLD, *DEVD, *DTAARA, *DTADCT, *DTAQ, *EDTD, *FCT, *FILE, *FNTRSC, *FNTTBL, *FORMDF, *FTR, *GSS, *IGCDCT, *IMGCLG, *IPXD, *JOBD, *JOBQ, *JRN, *JRNRCV, *LIB, *LIND, *LOCALE, *M36, *M36CFG, *MEDDFN, *MENU, *MGTCOL, *MODD, *MODULE, *MSGF, *MSGQ, *NODGRP, *NODL, *NTBD, *NWID, *NWSCFG, *NWSD, *ORTBL, *OUTQ, *OVL, *PAGDFN, *PAGSEG, *PDFMAP, *PDG, *PGM, *PNLGRP, *PRDAVL, *PRDDFN, *PRDLOD, *PSFCFG, *QMFORM, *QMQRY, *QRYDFN, *RCT, *S36, *SBSD, *SCHIDX, *SPADCT, *SQLPKG, *SQLUDT, *SQLXSR, *SRVPGM, *SSND, *SVRSTG, *TBL, *TIMZON, *USRIDX, *USRPRF, *USRQ, *USRSPC, *VLDL, *WSCST

object-type
Enter the object type of the object to be changed.

NEWPGP New primary group

Sets the user who is to be the new primary group for the object. The user profile must already exist when this command is run, and must have a group identifier (or gid ) assigned to it.

Type
*NAME
Required
Yes
Length
10
Case
Uppercase

Suggested / special values: *NONE

*NONE
The object does not have a primary group.
name
Enter the name of the user profile who is to be the new primary group for the object.

ASPDEV ASP device

Sets the auxiliary storage pool (ASP) device name where the library that contains the object (OBJ parameter) is located. If the object's library resides in an ASP that is not part of the library name space associated with the job, this parameter must be specified to ensure the correct object is used as the target of this command's operation.

Type
*NAME
Required
No
Default
*
Length
10
Case
Uppercase

Suggested / special values: *, *SYSBAS

*
The ASPs that are currently part of the job's library name space will be searched to locate the object.
*SYSBAS
The system ASP and all basic user ASPs will be searched to locate the object. No independent ASPs will be searched, even if the job has an ASP group.
name
Enter the device name of the independent ASP to be searched to locate the object. The independent ASP must have been activated (by varying on the ASP device) and have a status of AVAILABLE.

PGPAUT New primary group authority

Sets what authority the new primary group has to the object.

Type
*CHAR
Required
No
Default
*OLDPGP
Length
8
Case
Uppercase

Allowed values: *OLDPGP, *PRIVATE, *ALL, *CHANGE, *USE, *EXCLUDE

*OLDPGP
The new primary group has whatever authority the old primary group had to the object.
*PRIVATE
The new primary group has whatever private authority it had to the object. If the new primary group does not have a private authority to the object, it becomes the primary group but does not have any authority to the object.
*ALL
The user can perform all operations except those limited to the owner or controlled by authorization list management authority.
*CHANGE
The new primary group is given change authority to the object.
*USE
The user can perform basic operations on the object, such as running a program or reading a file. The user cannot change the object. *USE authority provides object operational authority, read authority, and execute authority.
*EXCLUDE
The user cannot access the object.

RVKOLDAUT Revoke old authority

Controls whether the authorities for the current primary group are revoked when the primary group is changed to the user specified for the New primary group (NEWPGP) parameter.

Type
*CHAR
Required
No
Default
*YES
Length
4
Case
Uppercase

Allowed values: *YES, *NO

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

Examples

CHGOBJPGP OBJ(USERLIB/PROGRAM1) OBJTYPE(*PGM) NEWPGP(ANN) PGPAUT(*CHANGE)

Changes the primary group for the program named PROGRAM1, located in the user library USERLIB, to the group named ANN. The new primary group has *CHANGE authority to the object.

IBM command documentation

Generated from os/cl/catalog/CHGOBJPGP.json and os/cl/help/CHGOBJPGP.json.