Hi All,
Some time i am able to understand DOW with small example. If some thing in complex i am unable to catch up how exactly it is working. I saw couple of code in this forum using DOW approach. In those code they are using more than 2 or 3 do until(last.XXX) after that set have (dataset)
Can some one explain with complex example????
Thanks
Sam
BTW: the easiest way, I think, to follow what is going on during the use of any DOW loop, is to insert "putlog _all_;" statements at strategic locations in your code. That way, you can see exactly what is resulting from every step of the loop(s).
I would suggest "The DOW-Loop Unrolled", presented by Paul Dorfman: analytics.ncsu.edu/sesug/2010/BB13.Dorfman.pdf
Have you read the following paper: http://support.sas.com/resources/papers/proceedings09/038-2009.pdf
It was written by one of the two individuals who are credited with discovering the concept and explains it via a couple of examples.
BTW: the easiest way, I think, to follow what is going on during the use of any DOW loop, is to insert "putlog _all_;" statements at strategic locations in your code. That way, you can see exactly what is resulting from every step of the loop(s).
Thank you so much Art and mkeintz. After reading the those links ...it makes more comfortable , understanding the DOW approach!!!!!!
One of the oddities in the SAS world is refering to a DO UNTIL (usually) program flow structure as DOW.
So what do you call a DO WHILE construct?
I have to admit to having learned a variety of other programming languages before SAS so use of DO UNTIL or WHILE wasn't very confusing. SAS does add a few twists though such as mixing interated and conditional into a single instruction.
It's not the do while, or do if construct that defines the DOW loop but, rather, the effect of placing set statements within a loop. I'm sure there are other ways of getting SAS to do more than it was intended to do, but we haven't figured that out yet.
And the "w" in DOW is, for some of us, attributable to the fact that many of us learned about it from Ian Whitlock, who taught all of us many things about effective use and understanding of the language constructs in SAS. Ian was not the first to show the technique, but probably the most influential.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.