aspose file tools*
The moose likes JDBC and the fly likes Passing Java Integer to COBOL compressed numeric value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Passing Java Integer to COBOL compressed numeric value" Watch "Passing Java Integer to COBOL compressed numeric value" New topic
Author

Passing Java Integer to COBOL compressed numeric value

Donna Reschke
Greenhorn

Joined: Jul 05, 2001
Posts: 23
I am calling a COBOL stored procedure from a Java Servlet. The COBOL stored procedure needs compressed numeric values and Java sends it Integer values. I'm getting an error saying my parameters don't match up. I'm wondering if it's because COBOL needs a compressed value. Has anyone else dealt with this or a similar problem? Please HELP!!!
Thanks so much.
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

there is an example of this here and here (I think!)
Jamie
Donna Reschke
Greenhorn

Joined: Jul 05, 2001
Posts: 23
It looked like to me that the links you gave me were for calling COBOL programs and I am calling a COBOL stored procedure. I have been using the CallableStatement variable in my Java code to call a COBOL stored proc. This is correct, isn't it???
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

I would think this could be problematic. I say this because CallableStatement is implemented by your jdbc drivers. So it only knows how to communicate with database stored procedures and java stored procedures.
if you can invoke this stored procedure from your databases sql editor(like a SQL*Plus session) then your driver may know how to handle the datatype mapping. This should then be included in your drivers documentation.
I guess what I'm saying is that I don't know...but I can sure hypothesize!
Jamie
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Passing Java Integer to COBOL compressed numeric value