Hi dataforums,
I work on a mainframe, and the stored procedures run in their own address space, a started task called DB2?SPAS where the ? is a letter denoting Test, Acceptance or Production. Our stored procedures are written in Cobol and any error message and debugging aids are DISPLAYed and can be found in the output for the started task. This is generally only done in testing.
The error message and return code is passed back as an argument to the executing procedure, therefore there is no need to access a db2 table to pick up the error as it is already present in the calling procedure.
Hope this helps.
Marc