Laut Handbuch musst du DB2_RETURN_STATUS
abfragen.
Besser scheint es aber kein RETURN zu verwenden, in diesem Fall wird SQLCODE usw. belassen:




If a RETURN statement with a specified return value is used to return from a
procedure then the SQLCODE, SQLSTATE, and message length in the SQLCA or
diagnostics area are initialized to zeros, and message text is set to blanks. An
error is not returned to the caller.