Prardhan N
asked on
How to Print SQLCODE and SQLSTATE info in the Procedure output in DB2 LUW 10.5
Hi All
Please let me know "How to Print SQLCODE and SQLSTATE info in the Procedure output when procedure fails
to process some input records.
So that i can understand the problem of issue.
Thanks in advance!!!
Please let me know "How to Print SQLCODE and SQLSTATE info in the Procedure output when procedure fails
to process some input records.
So that i can understand the problem of issue.
Thanks in advance!!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Question abandoned
Provided solution
Provided solution
ASKER
I got the clue that i need to create a error table.
I have declared the SQLCODE and SQLSTATE variables.
i have added following to my code.
DECLARE EXIT HANDLER FOR SQLEXCEPTION
SET SQLSTATEOUT = SQLSTATE;
DO i need to add the insert into error_code table in with in handler block?
How to move the control to "insert into error_code table" statement.
Pls let me know