Chapter 3: Communicating with Adaptive Server Enterprise
SQLCODE within SQLCA
The application should test sqlcode after each
statement executes, because Adaptive Server Enterprise updates it
after each execution. As a rule, use the whenever statement,
described in Chapter 8, “Handling Errors.” to
perform this task.