


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 that 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 function call.
<label> is a C skip label. 50 characters are available for <subprogram call>, 45 characters for <label>.
See also:
exec sql whenever sqlexception


