Create a subset of a SAS data set efficiently by selecting for processing only observations that meet a particular condition.
|Featured Step||DATA step|
|Featured Step Options and Statements||WHERE statement|
|Related Technique||PROC SQL, WHERE clause|
|A Closer Look||Comparing the WHERE Statement in the DATA Step and the Subsetting IF Statement|
Data set CELLPHONES contains the support records for one day. Only the first 25 of 10,000 observations are shown.
CELLPHONES Obs callhour calllength status reason 1 00 10 Resolved Text Msg Help 2 00 2 Transferred Other Feature Help 3 01 3 Resolved Start Service 4 01 2 Resolved Other 5 01 4 Resolved Voice Mail Help 6 01 4 Resolved Billing Change ...