INCLUDE_DATA

Tag Archives: For loops

For loops in SAS

When coding for loops in SAS, one neat thing to remember is that all of the parts of it are optional.
start <TO stop> <BY increment> <WHILE(expression) | UNTIL(expression)>
http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000201276.htm
So in another language, what might be
for(int i=0;i < max;i++) {
In SAS, you can leave out the “by 1″, since it’s the default increment. So this would be
do [...]