EZ Study

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

SAS Programing Certification Exam
Practice Questions & Answer set-32

Practice Question 156

The following SAS program is submitted:
data work.flights;
destination = 'CPH';
select(destination);
when('LHR') city = 'London';

when('CPH') city = 'Copenhagen';
otherwise;
end;
run;
Which one of the following is the value of the CITY variable?
A. London     B. Copenh     C. Copenhagen     D. ' ' (missing character value)


Answer is B.

Practice Question 157

The following SAS program is submitted:
data work.new;
length word $7;
amount = 4;
if amount = 4 then word = 'FOUR';
else if amount = 7 then word = 'SEVEN';
Click to Get Those Highly Recommended SAS Programmers' Books
else word = 'NONE!!!';     amount = 7;     run;
Which one of the following represents the values of the AMOUNT and WORD variables?
A. amount word
7 FOUR
B. amount word
7 SEVEN
C. amount word
4 FOUR
D. amount word
4 ' ' (missing character value)


Answer is A.

Practice Question 158

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 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 is D.

Practice Question 159

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 is D.

Related links:

Continue to SAS Practice Exam Question Answer Set-33   SAS interview Questions Answers
Back to SAS Practice Exam Question Answer Set-31   SAS Tutorial   Statistics Tutorial