METASEC_GETNID Function

Returns the nth identity for an object. Identities can come directly from the object, from the inheritance parents, from the default ACT, and from any ACTs that are directly associated with the object.

Syntax

rc = METASEC_GETNID(tc, uri, n, type, name, flags<, display, origin);>

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 tc is specified.
n (in)
specifies a one-based numeric index value that indicates which row to return from the array. For more information, see Array Parameters.
type (out)
returns a character variable that contains the identity type. The variable should be large enough to store the two available values, IdentityGroup or Person. (It should probably at least $13.)
name (out)
returns a character variable that contains the identity name, which must be unique for every identity of that type on the SAS Metadata Server.
flags (in)
specifies an optional integer bit field. You can use one of the following macro variables from %MDSECCON():
_SECAD_ACT_CONTENTS If the uri argument references an ACT, returns the identities that define the ACT, and not the identities from the access controls that protect the ACT.
_SECAD_RETURN_ROLE_TYPE Returns roles as the type for IdentityGroups that are acting as roles.
For more information, see Using the %MDSECCON() Macro.

Optional Arguments

display (out)
returns an optional character variable that contains the value of the DisplayName attribute if the identity has a DisplayName attribute.
origin (out)
indicates where the identity originates for the object in security:
D The identity originates from an ACT or ACE that is directly attached to the object.
I The identity originates from inheritance.
DI The identity originates from inheritance, but the identity is involved with direct access controls on the object.

Return Values

0
Successful completion.
-1
Unable to connect to the metadata server.
-2
Error returned from the metadata server; see log or sysmsg() for information.
-3
No objects match the specified URI.
-4
Numeric value (flag) exceeds the maximum usable value.
-5
n is out of range.
-99 or less
Other error; see log or sysmsg() for information.

Details

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