In addtion to the comments above, I wonder why you have created this macro at all. It contains no macro statements, so you could simply place the interior of the macro into the appropriate part of the larger program. So even if the code were correct, the macro serves no purpose whatsoever. It is a waste of time to turn this particular code into a macro. Normally, when you want to write a macro, you have a situation where you will want the macro output to vary given certain conditions, and/or certain input values. For example, here is a small macro that checks to see if a SAS data set exists and performs certain actions depending on whether or not the SAS data set exists. %macro check; %if %sysfunc(exist(work.mydata)) %then a=sqrt(b)%str(;); %else a=b%str(;); %mend;
... View more