When you set the options makes a difference.
It is the setting when CALL the macro that makes the difference.
120 %macro test ;
121 %if x in a b c %then %put found ; %else %put not found ;
122 %mend test;
123
124
125 options nominoperator;
126 %put %sysfunc(getoption(minoperator));
NOMINOPERATOR
127 %test;
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is
required. The condition was: x in a b c
ERROR: The macro TEST will stop executing.
128
129 options minoperator;
130 %put %sysfunc(getoption(minoperator));
MINOPERATOR
131 %test;
not found
Note that if you use the options on the %MACRO statement then your macro will not depend on the system option.
156 %macro test / minoperator;
157 %if x in a b c %then %put found ; %else %put not found ;
158 %mend test;
159
160
161 options nominoperator;
162 %put %sysfunc(getoption(minoperator));
NOMINOPERATOR
163 %test;
not found
164
165 options minoperator;
166 %put %sysfunc(getoption(minoperator));
MINOPERATOR
167 %test;
not found
... View more