Hello, I cannot grasp as of why I get two different results in the sense of number of libraries, when running theses two codes: data work.list_with_116;
keep name engine ;
* Temp-Variablen;
length uri_lib $256.;
* Ausgabe-Variablen;
length name $200.;
length engine $32.;
nobj=-1;
n=1;
*Foundation(Repository) > SASLibrary(Objekt);
nobj = metadata_getnobj("omsobj:SASLibrary?@Id contains '.'", n, uri_lib);
if nobj>0 then
do;
do i=1 to nobj;
nobj2 = metadata_getnobj("omsobj:SASLibrary?@Id contains '.'", i, uri_lib);
rc1 = metadata_getattr(uri_lib, "Name", name);
rc2 = metadata_getattr(uri_lib, "Engine", engine);
output;
end;
end;
run; and data work.list_with_114;
length serveruri liburi upasnuri $256 Bibliotheksname ServerContext $128 type id $17 Libref Engine $8 Physischer_Pfad Datenkbankschema_Label Datenkbankschema_Name $256;
keep ServerContext Bibliotheksname Libref Engine Physischer_Pfad Datenkbankschema_Label Datenkbankschema_Name;
/*Initialisieren, damit keine Notes im Log auftauchen*/
call missing(serveruri, liburi, upasnuri, ServerContext, Bibliotheksname, Engine, Libref);
/*Mit "1" initialisieren, wird dann in der Schleife unten hochgezaehlt */
nlibobj=1;
/*librc = Anzahl der Bibliotheken die gefunden wurden*/
librc=metadata_getnobj("omsobj:SASLibrary?@Id contains '.'",nlibobj,liburi);
do while (librc>0);
rc=metadata_getattr(liburi,'Name',Bibliotheksname);
rc=metadata_getattr(liburi,'Engine',Engine);
rc=metadata_getattr(liburi,'Libref',Libref);
n=1;
uprc=metadata_getnasn(liburi,'UsingPackages',n,upasnuri);
rc=metadata_getnasn(liburi, "DeployedComponents", n, serveruri);
rc=metadata_getattr(serveruri, "Name", ServerContext);
if uprc > 0 then do;
call missing(type,id,Physischer_Pfad,Datenkbankschema_Label,Datenkbankschema_Name);
rc=metadata_resolve(upasnuri,type,id);
if type='Directory' then do;
rc=metadata_getattr(upasnuri,'DirectoryName',Physischer_Pfad);
output;
end;
else if type='DatabaseSchema' then do;
rc=metadata_getattr(upasnuri,'Name',Datenkbankschema_Label);
rc=metadata_getattr(upasnuri,'SchemaName',Datenkbankschema_Name);
output;
end;
n+1;
uprc=metadata_getnasn(liburi,'UsingPackages',n,upasnuri);
end;
nlibobj+1;
put nlibobj=;
librc=metadata_getnobj("omsobj:SASLibrary?@Id contains '.'",nlibobj,liburi);
end;
run; When comparing the two created datasets " work.list_with_116 " (this dataset has 116 observations") and " work.list_with_114" (this dataset has 114 observations") , I can see, that in "work.list_with_114" two rows, i.e. two libraries, are missing, namely: What kind of engine is "list" ? Why are they not in "work.list_with_114" compared to "work.list_with_116"? Any help would be highly appreciated. Cheers, FK1
... View more