Der Monitor in SQL heißt hier WHENEVER:
Syntax

WHENEVER NOT FOUND

SQLERROR

SQLWARNING

CONTINUE

GOTO
host-Label

GO TO :



Description

The NOT FOUND, SQLERROR, or SQLWARNING clause is used to identify the

type of exception condition.

NOT FOUND

Identifies any condition that results in an SQLSTATE of '02000' or an

SQLCODE of +100.

SQLERROR

Identifies any condition that results in an SQLSTATE value where the first two

characters are not '00', '01', or '02'.

SQLWARNING

Identifies any condition that results in an SQLSTATE value where the first two

characters are '01', or a warning condition (SQLWARN0 is 'W').

The CONTINUE or GO TO clause are used to specify the next statement to be

executed when the identified type of exception condition exists.

CONTINUE

Specifies the next sequential instruction of the source program.

GOTO or GO TO
host-Label

Specifies the statement identified by
host-label. For host-label, substitute a single

token, optionally preceded by a colon.

Du kannst also per "SET VAR = DEC(FLD15, n, m)" und anschließender Abfrage des SQLCOD den Fehlerfall abfangen.