Previous Page | Next Page

DATA Step Functions for Reading and Writing Metadata

METADATA_PATHOBJ Function

Returns the Id and Type attributes of the specified folder object.


Syntax

rc = METADATA_PATHOBJ(proj, path, deftype, type, ID);


Arguments

Argument Direction Description
proj
in Not currently used. Set this argument to null by submitting an empty string " "
path
in Pathname of the object in SAS folders. Pathname begins with a forward slash. Can include the deftype in parentheses as a suffix.
deftype
in Optional public object type. Can be omitted if deftype is specified as a suffix in the path argument. The deftype is not the same as the type. For example, If you submit a deftype of StoredProcess, the returned type will be ClassifierMap. For more information, see SAS Metadata Model: Reference.
type
out Metadata object type of the returned ID
ID
out Unique identifier for the object


Return Values

Value Description
n
Number of objects that match the URI
0 Successful completion
-1 Unable to connect to the metadata server
-2 Syntax error in the path
-3 Named object not found in the path


Examples


Example 1: The Path Contains a (deftype) Suffix

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

    length id $20;
    length type $256;
    proj="";
    deftype="";
    id="";
    type="";

    rc=metadata_pathobj(proj,"/Samples/Stored Processes/Sample(StoredProcess)",
                        deftype,type,id);

    put rc=;
    put id=;
    put type=;

run;


Example 2: The deftype Is Passed as a Separate Parameter

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

    length id $20;
    length type $256;
    proj="";
    deftype="StoredProcess";
    id="";
    type="";

    rc=metadata_pathobj(proj,"/Samples/Stored Processes/Sample,
                        deftype,type,id);

    put rc=;
    put id=;
    put type=;

run;

Previous Page | Next Page | Top of Page