This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Java in General and the fly likes cobol stored procedure call Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "cobol stored procedure call" Watch "cobol stored procedure call" New topic

cobol stored procedure call

Michael Waserman

Joined: Jul 10, 2004
Posts: 28
Could anyone tell me where to find a cobol storproc call syntax on Java as well as on the mainframe site.
Here is my code extract;
try {
pool = getPool ();
con = pool.getConnection ();
CallableStatement cs = null;
String rCode = "";
try {
cs = con.prepareCall("{call SYSPROC.CCSSP101(?,?,?,?,?,?,?)}");
cs.setString ( 1, functAdd);
cs.setString ( 2, Number);
cs.setString ( 3, "");
cs.setString ( 4, dCode);
cs.setString ( 5, dateString);
cs.registerOutParameter(6, java.sql.Types.CHAR);
cs.registerOutParameter(7, java.sql.Types.CHAR);
result = cs.getString(6);
rCode = cs.getStrin(7);
pool.releaseConnection (con);
catch (Exception ex1) {
result = ex1.toString();
catch (Exception ex2) {
result = ex2.toString();
return result;

Issues: 1. DB2 table is not getting released after insert call,
2. Error message comming as parameter (6) is not getting reset to
3. After Cobol storproc was recompiled it is not picking up the new

Thanks. Michael.
Have you checked out Aspose?
subject: cobol stored procedure call
It's not a secret anymore!