Question 40 :

 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 WORK.SALARY, currently ordered by DEPARTMENT, contains 100 observations for each of 5 departments.

 Which one of the following represents how many observations the WORK.TOTAL data set contains?

  1. 5
  2. Get all Questions and Answer from here
  3. You need to have paid subscription to access all questions
  4. Thanks for considering SAS Certification Material

 Correct Answer : 1

 Exp : The most important statement in the program for this question is if last.department;

 We will get output only if last.department becomes true and we know there are five departments and data is sorted by department so last.department will become true 5 times and thus 5

 observation in output.

You can access to full explanation to question and answer from this page.