nerdexam
SAS_Institute

A00-211 · Question #145

The following SAS program is submitted: data work.total; set work.salary(keep = department wagerate); by department; if first.department then payroll = 0; payroll + wagerate; if last.department…

The correct answer is C. The values of the variable PAYROLL represent the total for each department in the WORK.SALARY. See the full explanation below for the reasoning.

Question

The following SAS program is submitted:

data work.total; set work.salary(keep = department wagerate); by department; if first.department then payroll = 0; payroll + wagerate; if last.department; run; The SAS data set named WORKSALARY contains 10 observations for each department, and is currently ordered by DEPARTMENT. Which statement is true?

Options

  • AThe BY statement in the DATA step causes a syntax error.
  • BThe statement payroll + wagerate; in the DATA step causes a syntax error.
  • CThe values of the variable PAYROLL represent the total for each department in the WORK.SALARY
  • DThe values of the variable PAYROLL represent a total for all values of WAGERATE in the WORKSALARY

How the community answered

(57 responses)
  • A
    5% (3)
  • B
    9% (5)
  • C
    84% (48)
  • D
    2% (1)

Community Discussion

No community discussion yet for this question.

Full A00-211 Practice