SQL/MX 2.x Reference Manual (H06.04+)

Embedded-Only SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
3-86
Considerations for WHENEVER
condition-action
specifies the action to take:
If you do not specify an action, NonStop SQL/MX discontinues checking for the
specified condition.
target
is a host label identifier that specifies a target location in a C program.
Considerations for WHENEVER
SQL/MX Extensions to WHENEVER
The SQL_WARNING condition and the CALL action are SQL/MX extensions.
Status Codes
FETCH returns a five-character status code to SQLSTATE, whose values include:
FETCH also returns an integer status code to SQLCODE, whose values include:
CONTINUE Continue with next statement.
GOTO target Pass control to the target location.
CALL C-function Execute the named C function.
PERFORM COBOL-routine Execute the named COBOL routine.
00000 The FETCH was successful.
02000 NOT FOUND—The result table is empty or the end of the table was encountered.
22xxx SQLERROR—Data exception condition.
0 The FETCH was successful.
100 NOT FOUND—The result table is empty or the end of the table was encountered.
> 0 SQL_WARNING—A warning was issued.
< 0 SQLERROR—An error occurred.