EZ Study

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

SAS Programing Certification Exam
Practice Questions & Answer set-4

Practice Question 14

The SAS data set EMPLOYEE_INFO is listed below:
IDNumber Expenses
2542 100.00
3612 133.15
2198 234.34
2198 111.12
The following SAS program is submitted:
proc sort data = employee_info;
Click to Get Those Highly Recommended SAS Programmers' Books
by statement here;     run;

Which one of the following BY statements completes the program and sorts the data sequentially by descending expense values within each descending IDNUMBER value?
A. by descending IDNumber Expenses;
B. by (IDNumber Expenses) descending;
C. by IDNumber descending Expenses descending;
D. by descending IDNumber descending Expenses;

Answer: D You need by descending IDNumber descending Expenses;

Practice Question 15

The SAS data set QTR1_REVENUE is listed below:
destination revenue
YYZ 53634
FRA 62129
FRA 75962
RDU 76254
YYZ 82174
The following SAS program is submitted:
proc sort data = qtr1_revenue;
by destination descending revenue; run;
Which one of the following represents the first observation in the output data set?
A. destination revenue
YYZ 82174
B. destination revenue
YYZ 53634
C. destination revenue
FRA 62129
D. destination revenue
FRA 75962

Answer: D

Practice Question 16

The following SAS program is submitted:
libname company 'SAS-data-library';
proc sort data = company.payroll;
by EmployeeIDNumber; run;
Write access has been granted to the COMPANY library.
Which one of the following represents how the observations are sorted?
A. COMPANY.PAYROLL is recreated in sorted order by EmployeeIDNumber.
B. COMPANY.PAYROLL is stored in original order, and a new data set PAYROLL is
created in sorted order by EmployeeIDNumber.
C. COMPANY.PAYROLL is stored in original order, and a new data set
COMPANY.PAYROLLSORTED is created in sorted order by EmployeeIDNumber.
D. COMPANY.PAYROLL is recreated in sorted order by EmployeeIDNumber, and a new data set PAYROLL is created in sorted order by EmployeeIDNumber.

Answer: A Without the OUT= output dataset option the Proc SORT procedure overwrites the dataset with the new sorted order.

Practice Question 17

The SAS data set EMPLOYEE_INFO is listed below:
IDNumber Expenses
2542 100.00
3612 133.15
2198 234.34
2198 111.12
The following SAS program is submitted:
proc sort data = employee_info; run;
Which one of the following BY statements completes the program and sorts the data sequentially by ascending expense values within each ascending IDNUMBER value?

A. by Expenses IDNumber;
B. by IDNumber Expenses;
C. by ascending (IDNumber Expenses);
D. by ascending IDNumber ascending Expenses;

Answer: B

Related links:

Continue to SAS Practice Exam Question Answer Set-5   SAS interview Questions Answers
Back to SAS Practice Exam Question Answer Set-3   SAS Tutorial   Statistics Tutorial