Wednesday, August 4, 2010

Check for the existence of a dataset

-
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;
-

No comments:

Post a Comment