Summary
Statements
IF condition THEN action;
<ELSE action>;
tests whether condition is
true. If the condition is true, the action in the THEN clause is carried
out. If condition is false
and an ELSE statement is present, then the ELSE action is carried
out. If condition is false
and no ELSE statement is present, then the next statement in the DATA
step is processed. Condition specifies
one or more numeric or character comparisons. action must
be an executable statement. That is, one that can be processed in
an individual iteration of the DATA step. (Statements that affect
the entire DATA step, such as LENGTH, are not executable.)
In SAS processing, any numeric value other than 0 or missing is true. The values 0 and missing are false. Therefore, ...
Get Step-by-Step Programming with Base SAS 9.4 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.