Click on the Comments to view the Answers

Wednesday, January 27, 2010

Q21

The following SAS program is submitted:

data work.one;
x = 3;
y = 2;
z = x ** y;
run;

Which one of the following is the value of the variable Z in the output data set?

A. 6
B. 9
C. . (missing numeric value)
D. The program fails to execute due to errors.

Q20

The SAS data set named WORK.TEST is listed below:

capacity airplanetype staff
150 Large 10

Which one of the following SAS programs created this data set?

A. data work.test;
capacity = 150;
if 100 le capacity le 200 then airplanetype = 'Large' and staff = 10;
else airplanetype = 'Small' and staff = 5;
run;

B. data work.test;
capacity = 150;
if 100 le capacity le 200 then do;
airplanetype = 'Large';
staff = 10;
end;
else do;
airplanetype = 'Small';
staff = 5;
end;
run;

C. data work.test;
capacity = 150;
if 100 le capacity le 200 then do;
airplanetype = 'Large';
staff = 10;
else do;
airplanetype = 'Small';
staff = 5;
end;
run;

D. data work.test;
capacity = 150;
if 100 le capacity le 200 then;
airplanetype = 'Small';
staff = 5;
else;
airplanetype = 'Large';
staff = 10;
run;

Q19

The following SAS program is submitted:

data work.flights;
destination = 'cph';
select(destination);
when('LHR') city = 'London';
when('CPH') city = 'Copenhagen';
otherwise city = 'Other';
end;
run;

Which one of the following is the value of the CITY variable?
A. Other
B. Copenh
C. Copenhagen
D. ' ' (missing character value)

Q18

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)

Q17

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;

Q16

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

Q15

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.

Q14

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;

Q13

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;
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


Technology Top Blogs On our way to 1,000,000 rss feeds - millionrss.com Hihera.com Blog Directory - OnToplist.com blogarama - the blog directory Blog Directory
Disclaimer

SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Other brand and product names are trademarks of their respective companies.

This blog is not responsible for any kind of copyright violation. This blog just collects the links hosted or posted by other servers/people/search engines.The creator of this page or the ISP(s) hosting any content on this site take no responsibility for the way you use the information provided on this site.If anybody has any copyright claim on it and doesn’t wish the information provided to be shown on our site, please do respond to this email. We shall remove them off immediately. Any inconvenience is regretted. Please do mention your exact grievance/problems with respect to certain third party links. We assure you that appropriate action will be taken off. Thank you