(Contents)(Previous)(Next)

WHENEVER Statements

Error and exception handling routines for SQL statements can be programmed by means of WHENEVER statements.

The WHENEVER statements must be placed before the SQL statements which they affect. WHENEVER actions are valid until they are changed by further WHENEVER statements or up to the end of the program. The static position in the source program and not the control flow determines the scope of a WHENEVER statement.

subprogram> is a procedure name, whereby <call> is transformed into a PERFORM statement.

<label> is a procedure name, whereby <go to> is transformed into a GO TO statement. 50 characters are available for <subprogram>, 45 characters for <label>.

See also:

EXEC SQL WHENEVER SQLWARNING

EXEC SQL WHENEVER SQLERROR

EXEC SQL WHENEVER SQLEXCEPTION

EXEC SQL WHENEVER NOT FOUND

EXEC SQL WHENEVER SQLBEGIN

EXEC SQL WHENEVER SQLEND


(Contents)(Previous)(Next)