Previous Page | Next Page

DATA Step Functions for Reading and Writing Metadata

METADATA_GETNPRP Function

Returns the nth property of the specified object.


Syntax

rc = METADATA_GETNPRP(uri, n, prop, value);


Arguments

Argument Direction Description
uri
in Uniform Resource Identifier
n
in Numeric index value that indicates which row to return from the array; see Array Parameters
prop
out Abstract property string
value
out Value of the specified property string


Return Values

Value Description
n
The number of properties for the URI
-1 Unable to connect to the metadata server
-2 No properties are defined for the object
-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 prop $256
           value $256;
    rc=1;
    n=1;
    
    do while(rc>0);

        /* Walk through all the properties on this machine object. */

        rc=metadata_getnprp("omsobj:Machine?@Name='bluedog'",
                            n,
                            prop,
                            value);

        if (rc>0) then put n= prop= value=;
        n=n+1;
    end;
run;


Related Functions

Previous Page | Next Page | Top of Page