SQLCODE within SQLCA

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