METASEC_SETAUTH Function

Sets authorization for an object.

Syntax

rc = METASEC_SETAUTH(tc, uri, type, name, auth, perm, cond<, flags>);

Required Arguments

tc (in)
specifies a transaction context handle; can be an empty string " " to invoke with a temporary context.
uri (in)
specifies a character variable or constant that contains the URI of the object to be manipulated by the transaction; can be an empty string " " if transaction context is specified.
type (in)
specifies a character variable or string constant that contains the identity type; the variable should be large enough to store the two available values, IdentityGroup or Person, probably at least $13.
name (in)
specifies a character variable that contains the identity name.
auth (in)
specifies a character variable that indicates the authorization to set for the permission and identity (which are specified in the perm and name arguments, respectively). Specify one of the following values:
G Grant
D Deny
R Remove
perm (in)
specifies a character variable that contains the name of the permission whose grant, deny, or remove state is specified in the auth argument.
cond (in)
specifies a character variable that contains the condition if a grant permission is conditional. The value can be very long, so if this argument is too short, the value is truncated. The permissions are case sensitive and must match the case of the permissions that are defined in the metadata server.

Optional Argument

flags (in)
Optional bit field. You can use one of the following macro variables from %MDSECCON():
_SECAD_ACT_CONTENTS Return the authorizations that define the contents of an ACT when the tc or uri argument references an ACT.
For more information, see Using the %MDSECCON() Macro.

Return Values

0
Successful completion.
-1
Unable to connect to the metadata server.
-3
No objects match the specified URI.
-99 or less
Other error; see log or sysmsg() for information.

Details

This function calls the ISecAdmin method SetAuthorizationsOnObj(). For information about the method, see SAS Open Metadata Interface: Reference and Usage.
See Example: Working with ACTs for a usage example.