By admin | September 4, 2009

SAS Certified Base Programmer 123 Questions (21)

The following SAS SORT procedure step generates an output data set:

proc sort data = sasuser.houses out = report;
    by style;
run;

In which library is the output data set stored?

A. WORK
B. REPORT
C. HOUSES
D. SASUSER

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.

By admin | September 4, 2009

SAS Certified Base Programmer 123 Questions (19)

The SAS data sets WORK.EMPLOYEE and WORK.SALARY are shown below:

WORK.EMPLOYEE
fname age 
Bruce 30 
Dan   40 
WORK.SALARY
name salary
Bruce 25000
Bruce 35000
Dan   25000

The following SAS program is submitted:

data work.empdata;
    <insert MERGE statement here>
    by fname;
    totsal+ salary;
run;

Which one of the following statements completes the merge of the two data sets by the FNAME variable?

A.

merge work.employee
work.salary (fname = name);

B.

merge work.employee
work.salary (name = fname);

C.

merge work.employee
work.salary (rename = (fname = name));

D.

merge work.employee
work.salary (rename = (name = fname));

By admin | September 3, 2009

SAS Certified Base Programmer 123 Questions (18)

The SAS data sets WORK.EMPLOYEE and WORK.SALARY are listed below:

WORK.EMPLOYEE
fname age 
Bruce 30 
Dan   40 
WORK.SALARY
fname salary
Bruce 25000
Bruce 35000
Dan   25000

The following SAS program is submitted:

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

How many variables are output to the WORK.EMPDATA data set?

A. 3
B. 4
C. 5
D. No variables are output to the data set as the program fails to execute due to errors.

By admin | September 3, 2009

SAS Certified Base Programmer 123 Questions (17)

The contents of two SAS data sets named EMPLOYEE and SALARY are listed below:

EMPLOYEE
name  age
Bruce 30
Dan   35
EMPLOYEE SALARY
name  salary
Bruce 40000
Bruce 35000
Dan   37000
Dan   .

The following SAS program is submitted:

data work.empsalary;
    merge work.employee (in = inemp)
          work.salary(in = insal);
    by name;
    if inemp and insal;
run;

How many observations will the data set WORK.EMPSALARY contain?

A. 2
B. 4
C. 5
D. 6