Hello, I am having an issue with something in SAS (version 9.4) and could use some expertise! Basically my macro currently looks like this:
proc sql;
select count(*) into: thirtyfive_counts
from history_upi, dummy_upi_clean, dummy_upi_76, history_upi_76;
quit;
%macro yyy(when);
%if &when ne 0 %then %do;
%include 'G:\Groups\HHR\new 35 file.sas';
%end;
%mend;
%yyy(&thirtyfive_counts);
Ultimately, I want this program(in the include statement) to be run if there are any records in any of those 4 datasets (listed in the from statement). The issue I am having is if one of those datasets is empty (which will sometimes be the case) it is giving me an error and not running the program. However, if I only list the datasets where this is a record, it will work fine. I would like it to run if there is an observation in any of the four datasets. Is this possible?
Thanks!