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

cobol stored procedure call

 
Michael Waserman
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic