SAS Advanced Programming for SAS 9 — Question 23
A data set stored on a network drive has the following characteristics:
✑ 14 Million observations
✑ 400 numeric variables
✑ 0 character variables of length 20
✑ Binary compression
A DATA Step query requires only 3 character and 15 numeric variables from this data set. What is the best way to reduce computer resource utilization in this
DATA Step?
Answer options
- A. A KEEP= data set option used on the SET Statement
- B. A KEEP Statement used within the DATA Step
- C. A KEEP= data set option used on the DATA Statement
- D. A DROP= data set option used on the DATA Statement
Correct answer: D
Explanation
The correct answer is D because using a DROP= data set option on the DATA Statement allows you to exclude the unnecessary variables from the dataset, thus conserving computer resources. Options A and C focus on keeping variables rather than dropping them, which would not optimize resource usage. Option B also retains variables within the DATA Step, which is not efficient in this scenario.