aspose file tools*
The moose likes JDBC and the fly likes SQLCODE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQLCODE" Watch "SQLCODE" New topic
Author

SQLCODE

Virginia Savage
Greenhorn

Joined: Sep 18, 2001
Posts: 1
I am an old mainframe programmer (23 years) that is learning JAVA. I would like to know how to get at the SQLCODE in my JAVA Bean.
My DB2 table is on the mainframe and I am updating it using a COBOL store procedure. I have not problem passing input parameters to the store procedure and updating the proper row. But I would like to display an error message if the row is not found during the update. The only place I can find where I can reference the SQLCODE is if it is a SQLEXCEPTION, which works fine. But +0100 is not an exception or a warning.
I thought I could have the Cobol store procedure return an output parameter that contains the SQLCODE, but I can't get that to work either. Input parameters work fine, but I can't seem to get the output parameter to work. I have it defined in my store procedure parameters as OUT. I think I am missing something.
I need HELP!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQLCODE
 
Similar Threads
Issue calling a stored procedure from Weblogic 8.1 workshop project
JMS Standalone application
CallableStatement resultset returns only columns and no data, where data exists.
numeric overflow error
Packed decimal conversion - Java