Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You have used DATA steps to read data into variables and to manipulate data such as defining new variables. After you have finished these tasks, you might want to simplify the data set by getting rid of extraneous variables. The options DROP and KEEP specify variables to be eliminated from or saved in a SAS data set. In addition to eliminating variables, you might want to keep observations that satisfy some criteria. The statements WHERE and IF enable you to specify values of variables that you want to keep in a SAS data set. For example, the following statement includes only observations of the numeric variable LITERACY that have missing values:
if literacy EQ .;