Chapter Summary

Text Summary

Purpose of DO Loops

DO loops process groups of SAS statements repeatedly, reducing the number of statements required in repetitive calculations.

Syntax of Iterative DO Loops

To construct an iterative DO loop, specify an index variable and the conditions that will execute the loop. These conditions include a start value for the index variable, a stop value, and an increment value. Start, stop, and increment values can be any number, numeric variable, or SAS expression that results in a number.

DO Loop Execution

During each iteration of a DO loop, statements within the loop execute. Once the loop's index value exceeds the stop value, the DO loop stops, and processing continues with the following DATA step ...

Get SAS Certification Prep Guide: Base Programming for SAS 9, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.