I need to identify if a dataset has no observations so I can create an IF statement later to ignore it. Any ideas??
Open to proc SQL, but I don't understand it.
I need to identify if a dataset has no observations so I can create an IF statement later to ignore it. Any ideas??
Open to proc SQL, but I don't understand it.
If a dataset has 0 observations, a set statement will not run. So, what I do is to create a macrovariable that is set only if the SET statement has been run, like this:
%let doesItExist=NO;
data _null_;
set theDataset;
call symput("doesItExist","YES");
stop;
run;
%put &doesItExist;