Chapter Contents |
Previous |
Next |
Note: Although it is generally more efficient to use a WHERE
expression and avoid the move to the PDV prior to processing, if the data
set contains observations with very few variables, the move to the PDV could
be cheap. However, one variable containing 32K bytes of character data is
not cheap, even though it is only one variable.
In most cases, you can use either method. However, the following table provides a list of tasks that require you to use a specific method:
If you want to ... | Use a ... |
---|---|
Make the selection in a procedure without using a preceding DATA step | WHERE expression |
Take advantage of the efficiency available with an indexed data set | WHERE expression |
Use one of a group of special operators, such as BETWEEN-AND, CONTAINS, IS MISSING or IS NULL, LIKE, SAME-AND, and SOUNDS LIKE | WHERE expression |
Base the selection on anything other than a variable value that already exists in a SAS data set, for example, on a value that is read from raw data or on a value that is calculated or assigned during the course of the DATA step | subsetting IF |
Make the selection at some point during a DATA step rather than at the beginning | subsetting IF |
Execute the selection conditionally | subsetting IF |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.