Summary
Statements
IF condition;
tests whether the condition
is true. If it is true, then SAS continues processing the current
observation. If it is false, then SAS stops processing the observation
and returns to the beginning of the DATA step. This type of IF statement
is called a subsetting IF statement because it produces a subset of
the original observations.
IF condition THEN action;
<ELSE action;>
tests whether condition
is true. If it is true, then the action in the THEN clause is executed.
If the condition is false and an ELSE statement is present, the ELSE
action is executed. If the condition is false and no ELSE statement
is present, then execution proceeds to the next statement in the DATA
step.
SET SAS-data-set (IN=
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.