By admin | September 4, 2009

SAS Certified Base Programmer 123 Questions (20)

The following SAS program is submitted:

proc sort data=work.employee;
    by descending fname;

proc sort sort data=work.salary;
    by descending fname;

data work.empdata;
    merge work.employee
    work.salary;
    by fname;
run;

Which one of the following statements explains why the program failed execution?

A. The SORT procedures contain invalid syntax.
B. The merged data sets are not permanent SAS data sets.
C. The data sets were not merged in the order by which they were sorted.
D. The RUN statements were omitted after each of the SORT procedures.

2 comments | Add One

  1. admin - 09/4/2009 at 12:54 pm

    C

  2. Deepak - 07/26/2011 at 2:14 pm

    There is typo in second sort procedure i.e. sort sort is written two times.

    Assuming that it is submitted correctly without syntax error, it will generate following error:
    BY variables are not properly sorted on data set WORK.EMPLOYEE.
    since data is sorted in descending order.

Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *