Multiple choice technology programming languages

data new(Keep x y); set old; run; What is the result?

  1. The new dataset will have only variables x and y

  2. Syntax Error.The Keep statement should be (Keep = x y).

  3. The old dataset will have only variables x and y

  4. The new dataset will have all variables

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The dataset option syntax is incorrect. The KEEP= option (when used as a dataset option) requires an equals sign: KEEP=x y or KEEP=(x y). The syntax 'Keep x y' without the equals sign is not valid for dataset options. It would cause a syntax error when the data step is compiled.