EZ Study

Actuarial Biology Chemistry Economics Calculators Confucius Engineer
Physics
C.S.


SAS Programing Certification Exam
Practice Questions & Answer set-12

Practice Question 47

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

proc sort data = sasuser.houses out = report;
Click to Get Those Highly Recommended SAS Programmers' Books
by style;     run;

In which library is the output data set stored?

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

Answer A Without library reference its going its saved in Work library

Practice Question 48

The following SAS program is submitted:

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

proc 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.

Answer C

Practice Question 49

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.

Answer: B

Practice Question 50

The contents of two SAS data sets named EMPLOYEE and SALARY are listed below:
EMPLOYEE SALARY
Bruce 30
Dan 35
NAME AGE NAME SALARY

Bruce 40000
Bruce 35000
Dan 37000
Dan  .

data emplsal;
merge employee (in=ine) salary(in=ins);
by name;
if ine and ins;
run;

How many observation are in EMPLSAL dataset
A. 4     B. 3     c. 2     D. 1

Answer A This is an example of one-many relationship merge.
Related links:

Continue to SAS Practice Exam Question Answer Set-13   SAS interview Questions Answers
Back to SAS Practice Exam Question Answer Set-11   SAS Tutorial   Statistics Tutorial