Command reference / sec

CHGOBJOWN

Change Object Owner

Transfers ownership of an object from one user to another. The authorities other users have to the object are not changed. The owner always has all applicable authorities unless they are explicitly revoked, and can grant any authority to any user, including to themselves. A user with *ALLOBJ special authority can transfer ownership of any object in the QSYS.lib file system, as can a user authorized to the QIBM_DB_SECADM function, though QIBM_DB_SECADM users cannot transfer ownership to themselves unless they have the required authorities. All users have add and delete authority for their own user profiles, so they can add or delete objects they created by transferring ownership.

Allowed environments: *ALL. Positional parameters: 3.

Restrictions

Parameters

OBJ Object

Specifies the object to be assigned to a new owner. A library name can be given to make sure the correct object changes ownership. This is a required parameter.

Type
*QUAL
Required
Yes
Case
Uppercase
*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the thread is searched; if none is specified, QGPL is used.
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

Specifies the object type of the object whose ownership is to be changed. The page lists many object type values without defining each one here; see the Commonly used parameters topic it references. This is a required parameter.

Type
*CHAR
Required
Yes
Length
7
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, *IGCSRT, *IMGCLG, *IPXD, *JOBD, *JOBQ, *JRN, *JRNRCV, *LIB, *LIND, *LOCALE, *M36, *M36CFG, *MEDDFN, *MENU, *MGTCOL, *MODD, *MODULE, *MSGF, *MSGQ, *NODGRP, *NODL, *NTBD, *NWID, *NWSCFG, *NWSD, *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

NEWOWN New owner

Specifies the user profile of the new owner for the object. The user profile must exist when this command runs. This is a required parameter.

Type
*NAME
Required
Yes
Length
10
Case
Uppercase

ASPDEV ASP device

Specifies the auxiliary storage pool (ASP) device name where the library containing the object is located. Needed if that library is in an ASP outside the job's library name space.

Type
*NAME
Required
No
Default
*
Length
10
Case
Uppercase

Suggested / special values: *, *SYSBAS

*
The ASPs in the job's library name space are searched, including the system ASP, all basic user ASPs and, if the job has an ASP group, its independent ASPs.
*SYSBAS
The system ASP and all basic user ASPs are searched; no independent ASPs are searched.

CUROWNAUT Current owner authority

Specifies whether the authorities for the current owner are revoked when ownership changes.

Type
*CHAR
Required
No
Default
*REVOKE
Length
7
Case
Uppercase

Allowed values: *REVOKE, *SAME

*REVOKE
The current owner's authority is revoked when the object ownership changes to the new owner.
*SAME
The current owner's authority is retained as a private authority to the object.

Examples

CHGOBJOWN OBJ(USERLIB/PROGRAM1) OBJTYPE(*PGM) NEWOWN(ANN)

Assigns ownership of program PROGRAM1 in library USERLIB to user ANN and revokes the current owner's authority.

IBM command documentation

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