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

The following SAS program is submitted:

The SAS data set WORK.SALARY is currently ordered by Gender within Department. Which inserted code will accumulate subtotals for each Gender within

Department?

    Correct Answer: D

    The correct answer is to use 'Department Gender'. In the code provided, the data is already ordered by Gender within Department, and the BY statement also makes it clear that the data needs to be processed by 'Department' first and then by 'Gender'. The 'BY Department Gender;' statement in SAS ensures that for each Department, the subsequent subgroups (Genders) are processed correctly, allowing the program to reset and accumulate Payroll properly for each Gender within each Department.

Discussion
mhminkovOption: A

given answer A is correct, as the question is about subgroups of genders within departments.

KleinstoneOption: D

why A not D? D is a better choice..