|
||
Introduction You can execute SAS statements repeatedly by placing them in a DO loop. DO loops can execute any number of times in a single iteration of the DATA step. Using DO loops lets you write concise DATA steps that are easier to change and debug. For example, the DO loop in this program eliminates the need for 12 separate programming statements to calculate annual earnings: data finance.earnings; set finance.master; Earned=0; do count=1 to 12; earned+(amount+earned)*(rate/12); end; run; You can also use DO loops to
This lesson shows you how to construct DO loops and how to include them in your programs. |
Time to CompleteThis lesson contains pages and takes approximately 1.5 hours to complete. |
ObjectivesIn this lesson, you learn to
|
PrerequisitesBefore taking this lesson, you should complete the following lessons:
|
Copyright
© 2003 SAS Institute Inc.,
Cary, NC, USA. All rights reserved. Terms of Use & Legal Information | Privacy Statement |