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!
source
share