METADATA_GETNASL Function

Returns the nth association for the specified object.

Syntax

rc = METADATA_GETNASL(uri, n, asn);

Required Arguments

uri (in)
specifies a Uniform Resource Identifier.
n (in)
numeric index value that indicates which row to return from the array; see Array Parameters.
asn (out)
returns the association name.

Return Values

n
The number of objects that match the URI
-1
Unable to connect to the metadata server
-3
No objects match the URI
-4
n is out of range

Example

options metaserver="a123.us.company.com"
	metaport=8561
	metauser="myid"
	metapass="mypassword"
	metarepository="myrepos";

data _null_;
    length assoc $256;
    rc=1;
    n=1;
    
    do while(rc>0);

        /* Walk through all possible associations of this object. */

        rc=metadata_getnasl("omsobj:Machine?@Name='bluedog'",
                            n,
                            assoc);
        put assoc=;
        n=n+1;
    end;
run;