File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 Spring in Action this week in the Spring 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!!
 
Don't get me started about those stupid light bulbs.
 
subject: SQLCODE