Click on the Comments to view the Answers

Sunday, January 24, 2010

Base 1

The following SAS program is submitted:


data test;
set sasuser.employees;
if 2 le years_service le 10 then amount = 1000;
else if years_service gt 10 then amount = 2000;
else amount = 0;
amount_per_year = years_service / amount;
run;


Which one of the following values does the variable AMOUNT_PER_YEAR contain if an employee has been with the company for one year?

A. 0
B. 1000
C. 2000
D. . (missing numeric value)

4 comments:

SASGuru said...

Answer: D

Amount is set to 0 and therefore amount_per_year is set to missing..

Try this…
data test;
years_service=1;
if 2 le years_service le 10 then amount = 1000;
else if years_service gt 10 then amount = 2000;
else amount = 0;
amount_per_year = years_service / amount;
run;

So amount_per_year = .

Unknown said...

hi sir

Unknown said...

d

Unknown said...

Denominator is 0 hence missing vale

Post a Comment



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