06-22-2015 02:48 PM
Hello all, this is my 3rd/4 questions!
I am trying to understand the named question above. I am posting it below for convenience:
Are SAS statements DO WHILE and DO UNTIL perfect substitutes in any case? Explain when they are substitutes, and when (if) they are not, and why.
I am expected to format my answers by including the following:
a) find out, for each issue, between 3 and 5 interesting documentation sources (eg SAS User's manuals, SAS course notes, archives of the SAS-L list, forums like SAS communities, SUGI papers, blogs on SAS, courses offered on university sites,...) explaining how to deal efficiently with this issue
b) for each issue, give all the possible answers, explaining their relative characteristics and advantages, indicating the sources where the information was found.
c) for each issue, the final synthesis should be very clear, proofread and potentially useful for people looking for explanations about the way to deal with the data management issues at stake, using SAS. It implies that, for each issue, the assignment should start with a brief explanation of what the issue is, then explain how to deal with this issue, and end with at least two short examples (easy to understand and to replicate) with comments between /* */.
I appreciate comprehensive help, as these answers will enable better understanding and better performance on my upcoming exam.
06-22-2015 03:20 PM
No they are not.
06-22-2015 03:26 PM
Hello Reeze, Thank you for addressing the question. Do you have any feedback for the "why" part of the question?
06-22-2015 04:22 PM
Here an acceptable example that shows a different between using UNTIL/WHILE to read a SAS data set.
Do you see the difference and can you explain it?
06-22-2015 10:29 PM
06-24-2015 01:16 AM
Well, the stop statement is optional with the until but required with the while loop. Reason being is that the until loop statement is evaluated at the bottom of the loop, and the while statement is evaluated at the top. Yet, I still don't understand substantively what is going on.
06-23-2015 10:18 AM
This article compares DO WHILE and DO UNTIL: http://blogs.sas.com/content/iml/2011/09/07/loops-in-sas.html