METADATA_GETNPRP Function

Returns the nth property of the specified object.

Syntax

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

Required Arguments

uri (in)
specifies a Uniform Resource Identifier.
n (in)
specifies a numeric index value that indicates which row to return from the array; see Array Parameters.
prop (out)
returns the name of an abstract property string.
value (out)
returns the value of the specified property string.

Return Values

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;