I want to know why is the metadata_getnatr
function is used with metadata_resolve
function when we are trying to read the metadata through data step functions.
For example: in the code that is covered 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 a 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 are they using getnatr function?
- Does the metadata_resolve gives a URI as an Output or what is the output?
Thanks!