Chapter 12: Performing Iterative Processing: Looping
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 all start with the keyword DO and are referred to as DO loops.
Demonstrating a DO Group
Although this chapter deals mainly with DO loops, this is a good place to demonstrate a DO group. When you conduct a logical test, for example, if Gender = ‘F’, you might want to do several things. A DO group enables you to accomplish this.
In this example, you want to perform several actions when the value of LDL (low-density lipids, ...
Get Getting Started with SAS Programming 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.