SAS DATA STEP Metadata Functions

I want to know why a function is metadata_getnatrused with a function metadata_resolvewhen we try to read metadata using data step functions.

For example: in the code that is specified in the link

Reproduced here:

Example 1: Using an object URI

data _null_;
    length id $20
       type $256;
    rc=metadata_resolve("omsobj:Machine?@Name='bluedog'",type,id);
    put rc=;
    put id=;
    put type=;
run;

Example 2: Using the Repository URI

data _null_;
    length id $20
       type $256
       attr $256
       value $256;

    rc=metadata_resolve("omsobj:RepositoryBase?@Name='myrepos'",type,id);

    put rc=;
    put id=;
    put type=;
    n=1;
    rc=1;
    do while(rc>=0);


rc=metadata_getnatr("omsobj:RepositoryBase?@Name='myrepos'",n,attr,value);
        if (rc>=0) then put attr=;
        if (rc>=0) then put value=;
        n=n+1;

    end;
run;
  • Why do they use getnatr function?
  • Does metadata_resolve provide URIs as output or what output?

Thank!

+4
source share
1 answer

I agree - the documentation here can be improved!

- URI ( ) , /.

-, -. REPO ( SAS), , (, FOUNDATION). , , URI metadata_resolve ( , , ). documentation RepositoryBase , , URI.

, metadata_resolve:

  • metadata_getnatr
  • , , URI
  • , uri ( ID)

SAS , , URI , metadata_resolve.

+1

Source: https://habr.com/ru/post/1674941/


All Articles