03-07-2014 01:55 PM
I am trying to execute the following code. It works fine when I change the "not =" to an "='" Sign. But I do not understand why not = is not working.
%if %eval( "&Reg." not = "ALL") %then
%let Group_vars = %STR(ACCOUNT_NAME);
%Else %let Group_vars = %STR(REGION PU9 GROUP_NAME ACCOUNT_NAME INSUTYPE);
Error Message -
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was:
"MAS" not = "ALL"
ERROR: %EVAL function has no expression to evaluate, or %IF statement has no condition.
ERROR: The macro COMBINE_AND_TRANSPOSE will stop executing.
03-07-2014 06:12 PM
SAS does use the <> operator but it is NOT the same as the NE operator.
In base SAS and IML it means take the maximum value.
So result of 0 <> -3 is 0 .
Need further help from the community? Please ask a new question.