SAS Base Programming for SAS 9 — Question 36
The SAS data set SASUSER.HOUSES contains a variable PRICE which has been assigned a permanent label of "Asking Price". Which SAS program temporarily replaces the label "Asking Price" with the label "Sale Price" in the output?
Answer options
- A. proc print data = sasuser.houses; label price = "Sale Price"; run;
- B. proc print data = sasuser.houses label; label price "Sale Price"; run;
- C. proc print data = sasuser.houses label; label price = "Sale Price"; run;
- D. proc print data = sasuser.houses; price = "Sale Price"; run;
Correct answer: C
Explanation
The correct answer is C because it uses the correct syntax for the LABEL statement within a PROC PRINT step, allowing for a temporary change of the label. Option A is incorrect because it lacks the required 'label' option in the PROC PRINT statement. Option B has a syntax error as it omits the '=' in the label assignment. Option D is incorrect because it does not use the LABEL statement at all.