Hi, I have a related question. I involving the macro as below. But seems SAS keep checking validation of the null macro variable in STRIP function, ignoring any condition rules like IF...THEN. How can I skip errors like that? data work._tst1; input sex $ ; datalines; 0 1 ; run; %let sex = sex ; %let sexOrienta = ; %macro isBlank(param); %sysevalf(%superq(param)=,boolean) %mend isBlank; data work._tst2; set work._tst1; has_sexOrienta = %isblank(&sexOrienta); *<--this works fine; if %isblank(&sexOrienta)=1 then sexOrienta = 'empty'; *<--this works fine if omit the below line; else sexOrienta=strip(&sexOrienta) ; *<--this line keep causing errors due to strip(null) problem, even condition is not met; run; Had been searching different key words for solutions, but couldn't find any. Thx a lot.
... View more