The LINK statement tells
SAS to jump immediately to the statement label that is indicated in
the LINK statement and to continue executing statements from that
point until a RETURN statement is executed. The RETURN statement sends
program control to the statement immediately following the LINK statement.
The LINK statement and
the destination must be in the same DATA step. The destination is
identified by a statement label in the LINK statement.
The LINK statement can
branch to a group of statements that contain another LINK statement.
This arrangement is known as nesting. To avoid infinite looping, SAS
has set a default number of nested LINK statements. You can have up
to 10 LINK statements with no intervening RETURN statements. When
more than one LINK statement has been executed, a RETURN statement
tells SAS to return to the statement that follows the last LINK statement
that was executed. However, you can use the /STACK option in the
DATA statement to increase the number of nested LINK statements.