Previous Page | Next Page

Controlling Program Flow

Branching to a Labeled Section (LINK) in SCL Programs

The LINK statement tells SCL to jump immediately to the specified statement label.

LINK label;

SCL then executes the statements from the statement label up to the next RETURN statement. The RETURN statement sends program control to the statement that immediately follows the LINK statement. The LINK statement and the label must be in the same entry.

The LINK statement can branch to a group of statements that contains another LINK statement; that is, you can nest LINK statements. You can have up to ten LINK statements with no intervening RETURN statements.

See Branching to Another Entry (GOTO) in SCL Programs for an example that includes LINK statements.

For more information, refer to SAS Language Reference: Dictionary.

Previous Page | Next Page | Top of Page