The Retrieve Public Authority command retrieves the security
information for the *PUBLIC user to an object. The command is
designed to work with programs that need to analyze security of
objects as opposed to being within production programs.
A typical command would be:
DCL &OBJAUT *CHAR LEN(10)
.
RTVPUBAUT OBJ(xxx) OBJTYPE(*FILE) OBJAUT(&OBJAUT)
IF (&OBJAUT *EQ '*EXCLUDE') DO ...
If the object has an authorization list and the *PUBLIC authority to
the object is *AUTL, the security attributes are taken from the
authorization list. The return variable AUTHSRC will contain a value
*OBJ or *AUTL depending on the source of the authorities.
If the user of the command is not authorized to the object, CPF9802
is sent as an escape message.
Command parameters *CMD
------------------
OBJ The qualified object name of the object to have the
*PUBLIC authorizations retrieved from. The library
value defaults to *LIBL. *CURLIB may also be
specified.
OBJTYPE The object type of the object to be retrieved. Any
system supported object type is valid.
USEAUT An optional return variable of X or blank that
determines if the public has at least *USE
authority. If specified, the variable must be
declared as *CHAR LEN(1). If the user has *USE or
greater than *USE authority (such as *CHANGE), an X
will exist in this return variable.
CHGAUT An optional return variable of X or blank that
determines if the public has at least *CHANGE
authority. If specified, the variable must be
declared as *CHAR LEN(1). If the user has *CHANGE
or greater than *CHANGE authority (such as *ALL), an
X will exist in this return variable.
OBJAUT An optional return variable that describes the value
displayed on EDTOBJAUT. For typical cases, the
value will be *USE, *CHANGE, *ALL, or *EXCLUDE. For
non-typical cases, the value will be 'USER DEF'. If
specified, the variable must be declared as *CHAR
LEN(10).
OBJOPR An optional return variable of X or blank that
determines if the public has *OBJOPR authority. If
specified, the variable must be declared as *CHAR
LEN(1).
OBJMGT An optional return variable of X or blank that
determines if the public has *OBJMGT authority. If
specified, the variable must be declared as *CHAR
LEN(1).
OBJEXIST An optional return variable of X or blank that
determines if the public has *OBJEXIST authority.
If specified, the variable must be declared as *CHAR
LEN(1).
OBJALTER An optional return variable of X or blank that
determines if the public has *OBJALTER authority.
If specified, the variable must be declared as *CHAR
LEN(1).
OBJREF An optional return variable of X or blank that
determines if the public has *OBJREF authority. If
specified, the variable must be declared as *CHAR
LEN(1).
DATAREAD An optional return variable of X or blank that
determines if the public has *READ authority. If
specified, the variable must be declared as *CHAR
LEN(1).
DATAADD An optional return variable of X or blank that
determines if the public has *ADD authority. If
specified, the variable must be declared as *CHAR
LEN(1).
DATAUPD An optional return variable of X or blank that
determines if the public has *UPD authority. If
specified, the variable must be declared as *CHAR
LEN(1).
DATADLT An optional return variable of X or blank that
determines if the public has *DLT authority. If
specified, the variable must be declared as *CHAR
LEN(1).
EXECUTE An optional return variable of X or blank that
determines if the public has *EXECUTE authority. If
specified, the variable must be declared as *CHAR
LEN(1).
AUTHLST An optional return variable that will contain *NONE
or the name of the authorization list used to secure
the object. If specified, the variable must be
declared as *CHAR LEN(10).
AUTHSRC An optional return variable that will contain *OBJ
or *AUTL to describe the source of the authorities
for the public user. *AUTL is only returned if the
object is secured by an authorization list and if
the *PUBLIC user is specified as *AUTL for the
object. If specified, the variable must be declared
as *CHAR LEN(10).
Restrictions
------------
None.
Prerequisites
-------------
None.
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
RTVPUBAUT *CMD TAASEDJ QATTCMD
TAASEDJC *PGM CLP TAASEDJC QATTCL
TAASEDJC2 *PGM CLP TAASEDJC2 QATTCL
|