Subsetting Data
As you read your
data, you can subset it by processing only those observations that
meet a specified condition. To do this, you can use a subsetting IF
statement in any DATA step.
Using a Subsetting IF Statement
The subsetting IF statement causes the DATA step to
continue processing only those observations that meet the condition
of the expression specified in the IF statement. The resulting SAS
data set or data sets contain a subset of the original external file
or SAS data set.
Syntax, subsetting IF
statement:
IF expression;
|
Get SAS Certification Prep Guide, 4th Edition 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.