In Oracle, I would handle exceptions like this
EXCEPTION
WHEN OTHERS THEN
-- open up an autonomous transaction
-- insert SQLCODE, SQLERRM and stored procedure name into log table
-- commit the autonomous transaction
ROLLBACK;
RAISE;
END;
the idea is that I don't lose teh logged error diagnostics when I
rollback the failed transaction.
Any ideas how to accomplish that in DB2 V8.1 for LUW?
TIA