From SAS documentation at: SAS(R) 9.2 Macro Language: Reference
The following is an example using a specified delimiter in an IN operator:
%put %eval(a in d,e,f,a,b,c); /* should print 0 */ %put %eval(a in d e f a b c); /* should print 1 */ option mindelimiter=','; %put %eval(a in d,e,f,a,b,c); /* should print 1 */ %put %eval(a in d e f a b c); /* should print 0 */ Great, so I copy and paste the code above into a brand new SAS 9.3 (not SAS 9.2, because I no longer have SAS 9.2) session, and here is the SASLOG 1 %put %eval(a in d,e,f,a,b,c); /* should print 0 */ ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: a in d,e,f,a,b,c 2 %put %eval(a in d e f a b c); /* should print 1 */ ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: a in d e f a b c 3 option mindelimiter=','; 4 %put %eval(a in d,e,f,a,b,c); /* should print 1 */ ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: a in d,e,f,a,b,c 5 %put %eval(a in d e f a b c); /* should print 0 */ ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: a in d e f a b c I hope someone can explain why this isn't working. Thanks.
... View more