Hello, I have a huge piece of code which contains multiple data steps, macros, proc sqls, loops etc. such that this entire piece of code needs to run only if a certain condition is met. data _null_;
now=today();
d=day(now);
put d;
if d in (30,31,1,2,3,4) then call symput ('run','N');
else call symput ('run','Y');
run;
%put &run.; %macro selection; [entire code: data steps, macros, proc sqls, loops etc. ] %mend; data _null_; %if &run.='Y' %then %do; %selection; end; This is the error that I get: 975 data _null_; 976 %if &run.='Y' %then %do; ERROR: Nesting of %IF statements in open code is not supported. %IF ignored. ERROR: Skipping to next %END statement. 977 %selection; MLOGIC(SELECTION): Beginning execution. Would there be a way to conditionally execute a huge piece of code? Appreciate the help!
... View more