Checking the execution of SQL statements
After executing an SQL statement, your program should check for any error codes before you commit the data and handle the errors that they represent.
You can check the execution of SQL statements in one of the following ways:
- By displaying specific fields in the SQLIMSCA.
- By testing SQLIMSCODE or SQLIMSSTATE for specific values.
- By using the WHENEVER statement in your application program.
- By testing indicator variables to detect numeric errors.