-
The exist function checks for the existence of a dataset.
-
options mprint mlogic symbolgen;
%macro test;
%if %sysfunc(exist(work.dummy))=0 %then %do;
%goto quit;
%end;
%else %do;
proc sql; select count(distinct pt) into: tst from dummy;
run;
%put &tst;
%end;
%quit:
%mend;
-
%test;
%test;
-