Click on the Comments to view the Answers

Sunday, January 24, 2010

Base 17

The following SAS program is submitted:


libname sasdata 'SAS-data-library';
data test;
set sasdata.chemists;
if jobcode = 'chem3' then description = 'Senior Chemist';
else description = 'Unknown';
run;


A value for the variable JOBCODE is listed below:
JOBCODE
CHEM3


Which one of the following values does the variable DESCRIPTION contain?


A. chem3
B. Unknown
C. Senior Chemist
D. ' ' (missing character value)

5 comments:

SASGuru said...

Answer: B

The dataset has ‘CHEM3’ and the if statement is looking for ‘chem3’…
Remember the SAS variables are not case-sensitive but the SAS DATA is…

Patrick said...

B

Sridhar Panthangi said...

Answer C.
try this

data ch;
input jcode $;
cards;
chem3
;

data ch1;
set ch;
if jcode = 'chem3' then description = 'Senior Chemist';
else description = 'Unknown';
run;

proc print data=ch1;
run;

Anonymous said...

Sridhar your answer clearly does not make sense. As SASGuru said SAS variables are not case sensitive but the Data is. So if you are searching for variable chem3 however the data is actually CHEM3 then you are not going to match. The result will be Unknown. The correct answer is B

ujju said...

I DIDN'T GET IT

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