METADATA_GETNASN Function
Returns the nth associated object of the specified association.
Syntax
rc = METADATA_GETNASN(uri, asn, n, nuri);
Required Arguments
- uri (in)
-
specifies a Uniform
Resource Identifier.
- asn (in)
-
specifies an association
name.
- n (in)
-
Numeric index value
that indicates which row to return from the array; see
Array Parameters.
- nuri
-
returns the URI of
the nth associated object.
Return Values
- n
-
The number of associated
objects
- -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 uri $256
text $256;
rc=1;
arc=0;
n=1;
do while(rc>0);
/* Walk through all the notes on this machine object. */
rc=metadata_getnasn("omsobj:Machine?@Name='bluedog'",
"Notes",
n,
uri);
arc=1;
if (rc>0) then arc=metadata_getattr(uri,"StoredText",text);
if (arc=0) then put text=;
n=n+1;
end;
run;