Hi, The following code doesn't work. I'm wondering if someone could suggest a fix. Note: I am trying to mimic an if-then statement with basically two conditions, e.g., if x then 1, if y then 2, else z. ..I can't figure out how to get it to do that as I'm not as proficient in macros. %if &trim=0 %then %do; %let condition = %str(if myvars(i)< perct1(i) then myvars(i)=perct1(i) ); %let condition = %str(if myvars(i)> perct2(i) then myvars(i)=perct2(i)); %end; %else %let condition = %str(myvars(i)=min(perct2(i),max(perct1(i),myvars(i))) );
... View more