METADATA_GETATTR Function

Returns the value of the specified attribute for the specified object.

Syntax

rc = METADATA_GETATTR(uri, attr, value);

Required Arguments

uri (in)
specifies a Uniform Resource Identifier.
attr (in)
specifies an attribute of a metadata object.
value (out)
returns the value of the specified attribute.

Return Values

0
Successful completion
-1
Unable to connect to the metadata server
-2
The attribute was not found
-3
No objects match the URI

Example

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

data _null_;

    length name $200
    	   desc $200
    	   modified $100;

    rc=metadata_getattr("omsobj:Machine?@Name='bluedog'","Name",name);
    put rc=;
    put name=;

    rc=metadata_getattr("omsobj:Machine?@Name='bluedog'","Desc",desc);
    put rc=;
    put desc=;

   
rc=metadata_getattr("omsobj:Machine?@Name='bluedog'","MetadataUpdated",modified);
    put rc=;
    put modified=;

run;