vjpilp Beginner

Joined: 01 May 2004 Posts: 8 Topics: 2
|
Posted: Fri Jun 25, 2004 8:13 am Post subject: How to get SQLCODE back in JAVA Application? |
|
|
I am using DB2 Version 7.1 on mainframe. I am writing Stored Procedures in COBOL. If an error occurs after SQL processing, then I catch the error in the COBOL code and write a message to sysout and terminate the procedure with a GOBACK. However, I am not able to see the SQLCODE/SQLSTATE in java which is my client application accessing the mainframe database.
The same thing on a Unix DB2 database returns SQLSTATE to the client application when there is an error in the Stored Procedure.
On the other hand, if my stored proc abends with say S0C7 or something else, then I get an SQLSTATE in java indicating that the stored proc terminated abnormally.
I want to see the SQLSTATE whenever there is an SQLCODE other than 0. Is this dependent on some setting/Registering stored proc or some other configureable thing or is it that when I use DB2 I cannot get SQLCODE values back in my client application?
Links to references would be of great help. |
|