Error Handling Using the SQLCA
User-defined error, message and dbevent handlers offer the most flexibility for handling errors, database procedure messages, and database events. For more information, see the (see page
Advanced Processing) section in this chapter.
However, you can do error handling with the SQLCA implicitly by using whenever statements, or explicitly by checking the contents of the SQLCA fields sqlcode, sqlerrd, and sqlwarn0.