File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing Java Integer to COBOL compressed numeric value

 
Donna Reschke
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1879
MySQL Database Suse
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there is an example of this here and here (I think!)
Jamie
 
Donna Reschke
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1879
MySQL Database Suse
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic