Chapter 12: Performing Iterative Processing: Looping

Introduction

Demonstrating a DO Group

Describing a DO Loop

Using a DO Loop to Graph an Equation

DO Loops with Character Values

Leaving a Loop Based on Conditions (DO WHILE and DO UNTIL Statements)

DO WHILE

Combining an Iterative Loop with a WHILE Condition

Do UNTIL

Demonstrating That a DO UNTIL Loop Executes at Least Once

Combining an Iterative Loop with an UNTIL Condition

LEAVE and CONTINUE Statements

Conclusion

Problems

Introduction

Many programs use a process called looping. You can execute a series of statements a fixed number of times or you can set a condition that, when satisfied, will cause the iteration to start or stop and the rest of the program to continue. SAS iterative statements ...

Get An Introduction to SAS University 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.