O'Reilly logo

An Introduction to SAS University Edition by Ron Cody

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required