Previous Page | Next Page

DATA Step Functions for Reading and Writing Metadata

METADATA_GETATTR Function

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


Syntax

rc = METADATA_GETATTR(uri, attr, value);


Arguments

Argument Direction Description
uri
in Uniform Resource Identifier
attr
in Attribute of the metadata object
value
out Value of the specified attribute


Return Values

Argument Description
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;


Related Functions

Previous Page | Next Page | Top of Page