Hello everyone, I want to use an alternative method to simplify "%if (&a=1 or &a=2 or &a=3)" in macro %test in the SAS code below The %test macro works but the %test2 will cause error, the error parts caused by "%if &a in (1,2,3) %then....." Please advise. Thanks! Mike %macro test(a); %if (&a=1 or &a=2 or &a=3) %then %do;%put a=1/2/3;%end; %else %do;%put a=other;%end; %mend test; %test(a=2); %test(a=5); %macro test2(a); %if &a in (1,2,3) %then %do;%put a=1/2/3;%end; %else %do;%put a=other;%end; %mend test2; %test2(a=2); %test2(a=5);
... View more