METASEC_GETNACT Function

Returns the nth ACT.

Syntax

rc = METASEC_GETNACT(tc, uri, n, act_uri, name, desc, use<, 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 from which you want to return the ACTs.
If the URI is for a repository (in the form "ReposID:xxxxxxxx"), then the metadata server function GetAccessControlTemplateList() is called to obtain the ACT information.
If the URI is for an object (in the form "omsobj:ObjectType/xxxxxxxx.yyyyyyyy"), then GetACTsOnObj() is called.
Search syntax is supported, such as "omsobj:ObjectType?@Name='My Object' ".
n (in)
specifies a one-based numeric index value that indicates which row to return from the array. For information, see Array Parameters.
act_uri (out)
returns a character variable that contains the URI of the ACT that is requested; this URI is in the following form: "omsobj:AccessControlTemplate/xxxxxxxx.yyyyyyyy".
name (out)
returns a character variable that contains the name of the nth ACT.
desc (out)
returns a character variable that contains the description of the nth ACT.
use (out)
returns a character variable that contains the value of the USE attribute of the nth ACT. If the ACT is for a repository, the returned value is "REPOS". Otherwise, the returned value is an empty string.

Optional Argument

flags (in)
specifies an optional integer bit field. If the uri argument is in the form ReposID:yyyyyyyy (that is, GetAccessControlTemplateList() is called), you can use the following macro variable from %MDSECCON();
_SECAD_REPOS_DEPENDENCY_USES Return all ACTs in all SAS Metadata Repositories that are not of type PROJECT.
For more information, see Using the %MDSECCON() Macro.

Return Values

0
Successful completion, but no ACTs are found to be applied to the object.
-1
Unable to connect to the metadata server.
-2
Error returning the ACT list; see log or sysmsg() for information.
-3
No objects match the specified URI.
-4
Numeric value (n) exceeds the maximum usable value.
-5
n is out of range.
-99 or less
Other error; see log or sysmsg() for information.

Details

If the uri argument represents a repository, then the ACTs in the repository are returned. If uri does not represent a repository, then the ACTs that protect the object are returned.
This function calls the ISecAdmin method GetAccessControlTemplateList() or GetACTsOnObj(), depending on the form of the URI in the uri argument. For information about the methods, see SAS Open Metadata Interface: Reference and Usage.
See Example: Working with ACTs for a usage example.