On completion of a handler action, status variables are set to the following values:
Status Variable | Status Code |
---|---|
SQLSTATE | '00000' |
SQLCODE | 0 |
ACTIVITY_COUNT | 0 |
These values are returned only if the handler is of CONTINUE type. In the case of EXIT handler, control exits the compound statement in which the condition is raised.
If the evaluation of an expression within a stored procedure raises an exception or completion condition, then the values for the status variables SQLSTATE, SQLCODE, and ACTIVITY_COUNT are all set to values corresponding to the particular warning, error or failure code that the system returned. An example is a divide-by-zero condition.
Successful evaluation of an expression does not raise a completion condition.