September 2019
Beginner to intermediate
346 pages
7h 35m
English
There will be countless occasions when a user will need to use the DROP or KEEP options. These options help retain the records that are needed in the output dataset. Using certain programming statements can help reduce the execution time of the program by subsetting the records from the input dataset. Let's look at the following example:
DATA Keep_and_Drop (DROP = Prev_yr_index);SET Cost_Living (KEEP = City Index Prev_yr_index);WHERE Index < Prev_yr_index;RUN;
This produces the following output:

The KEEP option helped restrict the input dataset being read to include only the City, Index, and Prev_yr_index variables. After ...
Read now
Unlock full access