Exam A00-211 All QuestionsBrowse all questions from this exam
Question 9

The following SAS program is submitted:

proc sort data = work.employee;

by descending fname;

proc sort data = work.salary;

by descending fname;

data work.empdata;

merge work.employee

work.salary;

by fname;

run;

Why does the program rail to execute?

    Correct Answer: C

    The program fails to execute because the RUN statement was omitted after each of the SORT procedures. In SAS, each PROC or DATA step must be concluded with a RUN statement to execute properly. Without the RUN statement, SAS does not know to execute the PROC SORT steps before attempting to merge the data sets in the DATA step.

Discussion
Sai_krishna_Option: D

The Code appears to be correct syntactically, but there's a small issue with the MERGE statement. You should use the BY statement after the MERGE statement to specify the variables by which the datasets are merged.

Mouni_18Option: D

Answer D is correct.