MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to get SQLCODE back in JAVA Application?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
vjpilp
Beginner


Joined: 01 May 2004
Posts: 8
Topics: 2

PostPosted: Fri Jun 25, 2004 8:13 am    Post subject: How to get SQLCODE back in JAVA Application? Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group