DATA Step Functions for Reading and Writing Metadata |
Purges the specified URI.
rc = METADATA_PURGE(<uri>);
Argument |
Direction |
Description |
uri
|
in |
Uniform Resource Identifier; if no argument is specified, the entire
connection is purged from the cache |
Value |
Description |
0 |
Object successfully purged |
For performance reasons, metadata objects are cached by URI. To refresh
the metadata object with the latest data from the metadata server, purge the
URI with the METADATA_PURGE function.
options metaserver="a123.us.company.com"
metaport=8561
metauser="myid"
metapass="mypassword"
metarepository="myrepos";
data _null_;
length association $256;
rc=1;
n=1;
do while(rc>0);
/* This will make this DATA step run much slower by */
/* purging the object cache, which requires the metadata */
/* server to be accessed again. */
/* Compare run timings by commenting out the purge. */
rc=metadata_purge("omsobj:Machine?@Name='bluedog'");
/* Walk through all possible associations of this object. */
rc=metadata_getnasl("omsobj:Machine?@Name='bluedog'",
n,
association);
put association=;
n=n+1;
end;
run;
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.