Click on the Comments to view the Answers

Wednesday, January 27, 2010

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;

12 comments:

SASGuru said...

Answer: B

Tricky one…all look similar…check for the syntax for do;end;

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;

Ravi Kishore said...

Answer is B

Rujuta........ said...

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;

siva said...

Answer B

Amy said...

B

Ryan Lo said...

Answer is B.

Multiple statements must enclosed with DO block.

kinnari said...

Answer is B

Gaurav Verma said...

B

Pooja said...

Been learning SAS a week, and don't know why A won't work.
You can't have 'and' in 'then'?
And is
if 100 le capacity le 200 then ...
equivalent to
if capacity ge 100 and capacity le 100 then ..
?

Thanks!

sindhu said...

Can any one clear why option "A" is not correct please?

Unknown said...

When you need to execute a group of statements, you need to use Do and END statement.

Do;
SAS Statements;
END;

Harsh Mohan said...

For latest and updated SAS certification dumps in PDF format contact us at completeexamcollection@gmail.com.
Refer our blog for more details
http://completeexamcollection.blogspot.in/2015/12/sas-certification-dumps.html

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