Include a test of SQLCODE (or SQLSTATE if you are not using SQLCA) after each execution of an embedded SQL or stored procedure statement to ensure that the statement completes successfully. You also should always write application code, or use appropriate condition handlers if the application is a stored procedure, to handle unacceptable status variable values.