I have code of the following form: %macro y(y); else if year=200&y. then do; <code>; end; %mend y; %macro go(com); data &com._1 merge &com._2 &com._3 ; by type; if year=2001 then do; <code>; end; %y(2); %y(3); %y(4); %y(5); run; %mend go; %go(ABC); When run, I get an error message on the invocation of %y(3), %y(4), and %y(5) that: ERROR 160-185: No matching IF-THEN clause If I change the code of the "y" macro to just be an if statement, the problem goes away, but I can't figure out why the problem exists in the first place. Any thoughts on why this is happening?
... View more