Click on the Comments to view the Answers

Sunday, January 24, 2010

Base 32

The following SAS program is submitted:


data work.clients;
calls = 6;
do while (calls le 6);
    calls + 1;
end;
run;


Which one of the following is the value of the variable CALLS in the output data set?
A. 4
B. 5
C. 6
D. 7

4 comments:

SASGuru said...

Answer D.
Calls advances to 7 then stops in the do while loop

kat said...

do you not have to put
calls = calls + 1?

Unknown said...

@kat: you may write calls = calls + 1. I believe that is called an assignment statement in SAS. One downside of assignement statement is that it does not ignore missing values. However, you can solve it by adding a RETAIN statement.

By writing calls +1 as shown above, it is called SUM statement. It ignores the missing values.

Unknown said...

@FU:
Even though if we use RETAIN stmt and missing value is there in input values, then also it shows the result until the missing value obs comes, hence for proper result direct arithmetic operation performed.

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