my dog learned polymorphism*
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 Android Security Essentials Live Lessons this week in the Android 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.
I agree. Here's the link:
subject: cobol stored procedure call
Similar Threads
Calling Oracle Stored Procedure
calling a stored procedure in Jsp
DB2 connection
Call PLSQL procedure from Java, parameter error
Oracle wrong number or types of arguments...