METADATA_SETPROP Function

Sets the specified property for the specified object.

Syntax

rc = METADATA_SETPROP(uri, prop, value, propuri );

Required Arguments

uri (in)
specifies a Uniform Resource Identifier.
prop (in)
specifies an abstract property string.
value (in)
specifies a value for the specified property.
propuri (out)
returns the URI of the property object that is associated with the input URI.

Return Values

1
New property was created and set.
0
Existing property was successfully set.
-1
Unable to connect to the metadata server.
-2
Unable to set the attribute.
-3
No objects match the URI.
-4
Unable to create a new property.

Example

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

data _null_;
    length propuri $200;
    rc=metadata_setprop("omsobj:Machine?@Name='bluedog'","New Property",
                        "my value",propuri);
    if rc>=0 then put propuri=;
run;