


SQL-PL supports the handling of such error situations as follows: Depending on the SQL return code it is examined whether the program currently running has a routine with the name SQLERROR, SQLEXCEPTION, SQLNOTFOUND, SQLTIMEOUT or SQLWARNING. If so, this routine is implicitly called with CALL. Otherwise, the current routine is continued with the next statement.

The routines for the handling of SQL errors can have a formal parameter. The name of the routine in which the SQL error occurred is assigned to this parameter by the SQL-PL runtime system.
Example: SQLERROR routine

Syntax:



