SAS: conditional statement error?

64 Views Asked by At

Could you please help me understand why this statement is incorrect (from a quiz). For some reason I can't see a problem.

if total = 140 then status EQ 'works';

Thanks!

1

There are 1 best solutions below

2
On BEST ANSWER

eq is the comparison equals operator, not the assignment equals operator. = performs both roles.

So,

if total eq 140 then status='works';

would be perfectly legal.