1.

How do you specify the number of iterations and specific conditions within a single do loop?

Answer»

The code below illustrates how to specify the number of iterations and SPECIFIC conditions within a single do loop. The ITERATIVE DO statement executes the DO loop until the Sum is greater than or EQUAL to 50000, or until the DO loop has executed 10 times, WHICHEVER comes first. 

data Scaler; do i=1 to 50 until (Sum>=50000); Year+1; Sum+5000; Sum+Sum*.10; END; run;


Discussion

No Comment Found