File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes SQLCODE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "SQLCODE" Watch "SQLCODE" New topic


Virginia Savage

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:
subject: SQLCODE
It's not a secret anymore!