Command reference / sec

GRTOBJAUT

Grant Object Authority

Grants specific authority on the named objects to named users, to *PUBLIC, to the users of a reference object, or to an authorization list. AUT(*AUTL) takes the public authority from the authorization list securing the object, and AUTL either secures an object with an authorization list or removes one. User profiles cannot be secured by an authorization list. The command can be used by the object's owner, a user with object management authority, a user with *ALLOBJ special authority, or a user authorized to the QIBM_DB_SECADM function. Only the owner or a user with *ALLOBJ can grant object management authority. With REPLACE(*NO), greater existing authority is kept unless *EXCLUDE is granted; REPLACE(*YES) removes current authority first. A reference object's authority is applied in the same way to the target object.

Allowed environments: *ALL. Positional parameters: 4.

Restrictions

Parameters

OBJ Object

Specifies the objects for which specific authority is to be given to one or more users. This is a required parameter. It is a qualified name: qualifier 1 is the object and qualifier 2 is the library.

Type
*QUAL
Required
Yes
Case
Uppercase
*ALL
Qualifier 1: specific authority is given to all objects of the specified OBJTYPE. Qualifier 2: all libraries in the ASPs specified by ASPDEV are searched. A specific library name must be given when *ALL is used for the object.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Object Object

Type
*GENERIC
Required
No
Length
10
Case
Uppercase

Suggested / special values: *ALL

Library Library

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

Suggested / special values: *LIBL, *CURLIB, *ALL, *ALLUSR, *USRLIBL, *ALLAVL, *ALLUSRAVL

OBJTYPE Object type

Specifies the object type of the objects for which specific authorities are to be given to the specified users or to an authorization list. This is a required parameter.

Type
*CHAR
Required
Yes
Length
7
Case
Uppercase

Allowed values: *ALL, *ALRTBL, *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, *IGCTBL, *IMGCLG, *IPXD, *JOBD, *JOBQ, *JOBSCD, *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

*ALL
Specific authorities for all supported object types are given to the specified users or to the authorization list.

USER Users

Specifies one or more users to whom authority for the named object is to be given. This is required unless REFOBJ or AUTL is specified. Up to 50 user profile names can be given.

Type
*NAME
Required
No
Length
10
List limit
50
Case
Uppercase

Suggested / special values: *PUBLIC

*PUBLIC
Users who do not have specific authority, are not on the authorization list, and whose groups have no authority or are on the authorization list are authorized as specified in AUT.

AUT Authority

Specifies the authority to be given to the users specified for the USER parameter. If a value is specified, AUTL, REFOBJ or REFOBJTYPE cannot be specified.

Type
*CHAR
Required
No
Default
*CHANGE
Length
9
List limit
10
Case
Uppercase

Allowed values: *CHANGE, *ALL, *USE, *EXCLUDE, *AUTL, *OBJALTER, *OBJEXIST, *OBJMGT, *OBJOPR, *OBJREF, *ADD, *DLT, *READ, *UPD, *EXECUTE

*CHANGE
The user can perform all operations except those limited to the owner or controlled by *OBJEXIST and *OBJMGT. This provides *OBJOPR and all data authority. For an authorization list, the user cannot add, change or remove users.
*ALL
The user can perform all operations except those limited to the owner or controlled by *AUTLMGT. The user can control the object's existence, specify its security, change it, and change its ownership.
*USE
The user can perform basic operations, such as running a program or reading a file, but cannot change the object. This provides *OBJOPR, *READ and *EXECUTE.
*EXCLUDE
The user cannot access the object.
*AUTL
The public authority of the authorization list specified on AUTL is used as the public authority for the object. Valid only with USER(*PUBLIC).
*OBJALTER
Allows altering the attributes of an object. For database files, it allows adding and removing triggers and constraints and changing file attributes. For SQL packages, it allows changing package attributes.
*OBJEXIST
Allows controlling the object's existence and ownership. Not needed for save/restore operations by a user with *SAVSYS.
*OBJMGT
Allows setting the object's security, moving or renaming it, and adding members to database files.
*OBJOPR
Allows looking at the object's description and using the object, subject to the user's data authority.
*OBJREF
Allows referencing an object from another object so that operations on that object may be restricted by it. For physical files, allows adding referential constraints where the file is the parent.
*ADD
Allows adding entries to an object, such as job entries to a queue or records to a file.
*DLT
Allows removing entries from an object.
*EXECUTE
Allows running a program or locating an object in a library.
*READ
Allows getting the contents of an entry in an object or running a program.
*UPD
Allows changing the entries in an object.

ASPDEV ASP device

Specifies the ASP device name where the library containing the object is located. Specify it if the library is in an ASP that is not part of the job's library name space.

Type
*NAME
Required
No
Default
*
Length
10
Case
Uppercase

Suggested / special values: *, *SYSBAS

*
The ASPs currently in the job's library name space are searched: the system ASP, all basic user ASPs, and any independent ASPs in the job's ASP group.
*SYSBAS
The system ASP and all basic user ASPs are searched. No independent ASPs are searched.

AUTL Authorization list

Specifies the authorization list whose entries are used to grant authority for the object. The user must have *AUTLMGT authority for that list. If a value is specified, AUT, REFOBJ or REFOBJTYPE cannot be specified.

Type
*NAME
Required
No
Length
10
Case
Uppercase

Suggested / special values: *NONE

*NONE
The authorization list securing the object is removed. If public authority in the object is *AUTL, it is changed to *EXCLUDE.

REFOBJ Reference object

Type
*QUAL
Required
No
Case
Uppercase
Qualified parts (object, then library; write LIBRARY/OBJECT)

Reference object Reference 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

REFOBJTYPE Reference object type

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

Allowed values: *OBJTYPE, *ALRTBL, *BNDDIR, *AUTL, *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, *IGCTBL, *IMGCLG, *IPXD, *JOBD, *JOBQ, *JOBSCD, *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, *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

REFASPDEV Reference ASP device

Type
*NAME
Required
No
Default
*
Length
10
Case
Uppercase

Suggested / special values: *, *SYSBAS

REPLACE Replace authority

Specifies whether the authorities given replace the user's current authorities.

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

Allowed values: *NO, *YES

*NO
The authorities are given, but no authority is removed, unless *EXCLUDE is being granted.
*YES
The user's current authorities are removed, then the specified authorities are given.

Examples

GRTOBJAUT OBJ(USERLIB/PROGRAM1) OBJTYPE(*PGM) USER(*PUBLIC)

Gives authority to use PROGRAM1 in USERLIB to all users who have no specific authority, are not on an authorization list, and whose groups have no authority or are not on the list. Since AUT is not specified, the authority given is change authority, so all users can run and debug the program.

GRTOBJAUT OBJ(MYLIB/PRGM3) OBJTYPE(*PGM) AUTL(KLIST)

Gives users the authority specified for them on authorization list KLIST for program PRGM3 in MYLIB.

IBM command documentation

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