SQLCODE = 100 heißt das Zauberwort.
Genauso wie in embedded SQL auch.

Allerdings auch SQLCODE < 0 gehört ggf. abgefragt.