SQLWARNING Keyword

If you use the SQLWARNING keyword, any SQL statement that generates a warning is handled as the WHENEVER SQLWARNING statement directs. If a warning occurs, the first field (sqlca.sqlwarn.sqlwarn0) of the warning structure in SQLCA is set to W, and the SQLSTATE variable is set to a class code of 01.

Besides the first field of the warning structure, a warning also sets an additional field to W. The field that is set indicates what type of warning occurred.

The next statement causes execution to stop if a warning condition exists:
WHENEVER SQLWARNING STOP

If you do not use any WHENEVER SQLWARNING statements in a program, the default action for WHENEVER SQLWARNING is CONTINUE.