DATA Step Functions for Reading and Writing Metadata |
Returns the nth associated object of the specified association.
Syntax |
rc = METADATA_GETNASN(uri, asn, n, nuri);
Arguments |
Argument | Direction | Description |
---|---|---|
uri |
in | Uniform Resource Identifier |
asn |
in | Association name |
n |
in | Numeric index value that indicates which row to return from the array; see Array Parameters |
nuri |
out | URI of the nth associated object |
Return Values |
Value | Description |
---|---|
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;
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.