aspose file tools*
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
JavaRanch » Java Forums » Java » Java in General
Bookmark "cobol stored procedure call" Watch "cobol stored procedure call" New topic
Author

cobol stored procedure call

Michael Waserman
Greenhorn

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);
cs.executeQuery();
result = cs.getString(6);
rCode = cs.getStrin(7);
cs.close();
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
space,
3. After Cobol storproc was recompiled it is not picking up the new
code.

Thanks. Michael.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cobol stored procedure call
 
Similar Threads
Oracle wrong number or types of arguments...
Calling Oracle Stored Procedure
DB2 connection
calling a stored procedure in Jsp
Call PLSQL procedure from Java, parameter error