next up previous
Next: Running SAS in batch Up: SAS Previous: Reading data into SAS

Looping

Here's an example of how to set up a loop in SAS. Note the use of the variable 'i'. 
%macro doloop;  
%do i=2004214 %to 2004244; 
data match2; 
set match; 
doy=&i; 
run; 
proc append base=full data=match2 force; 
run; 
%end;  
%mend doloop; 
%doloop;  
run;

Last modified 12/28/07.



Chris Paciorek 2012-01-21