Hi, I am not familiar with using Macro, but I think macro can really help to generate powerful code in my scenario. So, I have variable X1_1 to X10_1, each of them has its match Y1_1 to Y10_1. I want to create MI=1 if the condition is matched. DATA file; set file; IF X1_1 in (1:3) & Y1_1>=70 & Y1_1<=100 then MI=1; IF X2_1 in (1:3) & Y2_1>=70 & Y2_1<=100 then MI=1; ... IF X10_1 in (1:3) & Y10_1>=70 & Y10_1<=100 then MI=1; run; I wonder if anyone here can help me to use Macro to create my codes. Thank you so much.
... View more