GOTO [ ALLBASE/SQL Reference Manual ] MPE/iX 5.5 Documentation
ALLBASE/SQL Reference Manual
GOTO
The GOTO statement permits a jump to a labeled statement within a
procedure.
Scope
Procedures only
SQL Syntax
{GOTO } {Label }
{GO TO} {Integer}
Parameters
Label specifies an identifier label for branching
within the procedure.
Integer specifies an integer label for branching within
the procedure.
Description
The label or integer referred to in a GOTO statement is followed by a
colon and a statement.
Authorization
Anyone can use the GOTO statement.
Example
CREATE PROCEDURE Process10 AS
BEGIN
INSERT INTO SmallOrders VALUES ('Widget', 10);
IF ::sqlcode <> 0 THEN
GOTO Errors;
ENDIF;
RETURN 0;
Errors: PRINT 'There were errors.';
RETURN 1;
END;
MPE/iX 5.5 Documentation