Description
- label1
- Specifies the label for the GOTO statement. The label name
cannot be the same as the routine name or another label within the same scope.
For more information, see Handling errors and warnings.
- label2
- Specifies the labelled statement where processing is to continue. The
labelled statement and the GOTO statement must both be in the same scope:
- If the GOTO statement is defined in a FOR statement, label must be defined inside the same FOR statement, excluding a nested
FOR statement or nested compound statement.
- If the GOTO statement is defined outside a FOR statement, label must not be defined within a FOR statement or nested compound statement.
- If the GOTO statement is defined in a condition handler, label must be defined inside the same handler.
- If the GOTO statement is defined outside a condition handler, label must not be defined within a condition handler.
If label2 is not defined within a scope that
the GOTO statement can reach, an error is returned.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.