**SAS Programing Certification Exam**

Practice Questions & Answer set-33
### Practice Question 160

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 is A
### Practice Question 161

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 is B. No such ascending usage in proc sort!
### Practice Question 162

The SAS data set WORK.AWARDS is listed below:

fname points

Amy 2

Amy 1

Gerard 3

Wang 3

Wang 1

Wang 2

The following SAS program is submitted:

proc sort data = work.awards;

Click to Get Those Highly Recommended SAS Programmers' Books

by descending fname points;

run;

Which one of the following represents how the observations are sorted?

A. Wang 3

Gerard 3

Wang 2

Amy 2

Wang 1

Amy 1

B. Wang 3

Wang 2

Wang 1

Gerard 3

Amy 2

Amy 1

C. Wang 3

Wang 1

Wang 2

Gerard 3

Amy 2

Amy 1

D. Wang 1

Wang 2

Wang 3

Gerard 3

Amy 1

Amy 2

Answer is D.
** Related links: **
Continue to SAS Practice Exam Question Answer Set-34
SAS interview Questions Answers
Back to SAS Practice Exam Question Answer Set-32
SAS Tutorial
Statistics Tutorial