
Use the WHERE= data set option
with an input data set to select observations that meet the condition
specified in the WHERE expression before SAS brings them into the
DATA or PROC step for processing. Selecting observations that meet
the conditions of the WHERE expression is the first operation SAS
performs in each iteration of the DATA step.
You can also select
observations that are written to an output data set. In general, selecting
observations at the point of input is more efficient than selecting
them at the point of output. However, there are some cases when selecting
observations at the point of input is not practical or not possible.


You cannot use the WHERE= data
set option with the POINT= option in the SET and MODIFY statements.

If you use both the WHERE= data
set option and the WHERE statement in the same DATA step, SAS ignores
the WHERE statement for data sets with the WHERE= data set option.
However, you can use the WHERE= data set option with the WHERE command
in
SAS/FSP software.
Note: Using indexed SAS data sets
can improve performance significantly when you are using WHERE expressions
to access a subset of the observations in a SAS data set. See
Understanding SAS Indexes in SAS Language Reference: Concepts for a complete discussion of WHERE
expression processing with indexed data sets and a list of guidelines
to consider before indexing your SAS data sets.