METADATA_SETASSN Function
Modifies an association list for an object.
Syntax
rc = METADATA_SETASSN(uri, asn, mod, auri-1<,...auri-n>);
Required Arguments
- uri (in)
-
specifies a Uniform
Resource Identifier.
- asn (in)
-
specifies an association
name.
- mod (in)
-
specifies the modification
to be performed on the metadata object; values include the following:
- APPEND
-
Appends the specified
associations to the end of the specified object's association element
list without modifying any of the other associations on the list.
- MERGE
-
Modifies existing associations
in the specified object's association list, and adds any associations
that do not already exist (new and changed associations are placed
at the end of the association list; use REPLACE if you need to specify
the order of the association list).
- MODIFY
-
Modifies an existing
association, or adds an association that does not already exist (use
MODIFY with a single association; use MERGE for a multiple association*).
- REMOVE
-
Deletes the specified
associations from the specified object's association element list
without modifying any of the other associations on the list.
- REPLACE
-
For a single association*,
replaces an existing association with the specified association. For
a multiple association*, replaces an existing association list with
the specified association list. Any existing associations that are
not represented in the new association list are deleted.
* A single association
refers to an association name with a 0–to-1 or 1–to-1
cardinality. Only one association of that name is supported between
the specified metadata types.
A multiple association
refers to an association name with a 0–to-many or 1–to-many
cardinality. Many associations between the specified metadata types
is supported.
For more information
about associations and cardinality, see
SAS Open Metadata Interface: Reference and Usage.
- auri–1<,...auri-n> (in)
-
Return Values
- 0
-
Successful completion.
- -1
-
Unable to connect to
the metadata server.
- -3
-
No objects match the
input URI.
- -4
-
Unable to perform modification;
see the SAS log for details.
- -5
-
Invalid modification.
- -6
-
Unable to resolve association
list URIs.
Example
options metaserver="a123.us.company.com"
metaport=8561
metauser="myid"
metapass="mypassword"
metarepository="myrepos";
data _null_;
length uri $256;
rc=0;
/* Create a TextStore object. */
rc=metadata_newobj("TextStore",
uri,
"My TextStore");
put uri=;
rc=metadata_setassn("omsobj:Machine?@Name='bluedog'",
"Notes",
"Append",
uri);
put rc=;
rc=metadata_setassn("omsobj:Machine?@Name='bluedog'",
"Notes",
"Remove",
uri);
put rc=;
run;