How to obtain SQL Error Code?

Document ID : KB000013799
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

Custom error handling to capture DB2 exception errors from within an action block.

Question:

When using the Database Exception When Database Error, is there a way inside the action diagram to obtain the SQL Error Code?

Environment:
z/OS Host Encyclopedia and z/OS Implementation Toolset
Answer:

The sample code is in CEHBSAMP(GETXDBSQ). The developers can use it to create their own EAB to be called from an action diagram.