
61
5
Writing Loops in the DATA Step
5.1 Implicit and Explicit Loops
A loop is a basic logical programming concept where one or more statements
are executed repetitively until a predened condition is satised. Loops are
used in all programming languages. Compared to other programming
languages, loop processing is more complex in SAS
®
because of its unique
implicit loop. The implicit loop is not an easy construct to grasp, even by pro-
grammers with advanced skills in other programming languages. Knowing
when the time is right to create an explicit loop can also present a challenge
to the SAS programmer who has to work simultaneously with the i