Generating Data with DO Loops |
Conditionally Executing DO
Loops |
Using the DO WHILE Statement
You can use the DO WHILE statement to execute a DO loop while a condition is true. |
General form, DO WHILE statement:
where expression is a valid SAS expression enclosed in parentheses. |
The statements execute while the expression is true. An important difference between the DO UNTIL and DO WHILE statements is that the DO WHILE expression is evaluated at the top of the DO loop. If the expression is false the first time it is evaluated, the DO loop never executes. |
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.