Previous Page | Next Page

DATA Step Functions for Reading and Writing Metadata

METADATA_PURGE Function

Purges the specified URI.


Syntax

rc = METADATA_PURGE(<uri>);


Arguments

Argument Direction Description
uri
in Uniform Resource Identifier; if no argument is specified, the entire connection is purged from the cache


Return Values

Value Description
0 Object successfully purged


Details

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.


Example

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;

Previous Page | Next Page | Top of Page