I want to get the numbers of all libraries' datasets. I can use there kinds of ways, as following:
proc sql noprint;
select count(memname)
into :numwk1
from sashelp.vstable;
quit;
%put &numwk1; /*-------------------------------------=3677*/
data _null_;
set sashelp.vstable end=eof;
retain count 0;
count+1;
if eof then do;
call symput('numwk2',left(count));
end;
run;
%put &numwk2; /*--------------------------------------=3677*/
data _null_;
if 0 then set sashelp.vstable nobs=a;
call symput('numwk3',a);
run;
%put &numwk3; /*--------------------------=9.0071993E15*/
Why the third answer is different with others?
Thanks a million.
... View more