06-20-2013 05:07 AM
%Do can be used only with in the Macro,but in case of Do,you can use any where of the program even with in the macro.
which means you can not use %do in open code..
%do i=1 %to 10;
Above code gives you error,so in above scenario you need to use Do.
Hope this helps..
06-20-2013 09:26 AM
You can use %BY, but you can't use a decimal fraction like 0.1.
The last construction where DO can be used but %DO cannot is a combination of a range with WHILE or UNTIL.
Legitimate: do i=1 to 10 until (age > 21);
No good: %do i=1 %to 10 %until (&age > 21);
You can use %DO %WHILE or %DO %UNTIL, you just can't combine that with a range of values.