0

I'm trying to call stored procedure with name parameters from java and having an issues

Class.forName("com.ibm.db2.jcc.DB2Driver");
String connectionFormat = "jdbc:db2://TEST.NET:5224/D1278";
Connection conn = DriverManager.getConnection(connectionFormat, User.USERNAME, User.PASSWORD);
CallableStatement statement = conn.prepareCall("CALL SAMPLE.ESPA(PLAN=>?,LIB=>?,PARMS=>?)");
statement.setString("PLAN", "TEST1");
statement.setString("LIB", "'FTM.STORED.PROC'");
statement.setString("PARMS", "010000");

I'm getting com.ibm.db2.jcc.am.SqlException: [jcc][10453][12710][4.28.11] Cannot get the describe information for the calling stored procedure with name ESPA and path ' SYSIBM , SYSFUN , SYSPROC , SYSIBMADM ,

USER1' ERRORCODE=-4472, SQLSTATE=null
    at com.ibm.db2.jcc.am.b7.a(b7.java:794)
    at com.ibm.db2.jcc.am.b7.a(b7.java:66)
    at com.ibm.db2.jcc.am.b7.a(b7.java:107)
    at com.ibm.db2.jcc.am.CallableStatement.b0(CallableStatement.java:2291)
    at com.ibm.db2.jcc.am.CallableStatement.w(CallableStatement.java:2193)
    at com.ibm.db2.jcc.am.CallableStatement.setString(CallableStatement.java:1405)
    at com.ca.mat.agent.storedproc.ExecuteProcedure.<init>(ExecuteProcedure.java:56)
    at com.ca.mat.agent.storedproc.ExecuteProcedure.main(ExecuteProcedure.java:89)
mao
  • 11,321
  • 2
  • 13
  • 29
hotcoder
  • 41
  • 2
  • 10
  • Is your Db2-database on Z/OS ? – mao Aug 29 '22 at 09:11
  • Yes; I'm my db2-database is on z/os – hotcoder Aug 29 '22 at 09:12
  • Does more than one version of the stored-procedure exist in the target database? If so, this was a known (fixed) problem, supposedly fixed in your version, but maybe you could try the latest jdbc driver (4.31.10 at today's date). – mao Aug 29 '22 at 09:17
  • only 1 version of stored procedure. JDBC driver 4.31.10 not available in mvnrepository ? – hotcoder Aug 29 '22 at 09:51
  • Get the latest jdbc driver version via https://www.ibm.com/support/pages/db2-jdbc-driver-versions-and-downloads ( you can eliminate the driver version just for the purpose of a test). If the latest driver version (from IBM) has the same symptom, then you should open a ticket with IBM Db2 support (as you are a Z/OS customer you will have a support contract). – mao Aug 29 '22 at 11:02

0 Answers0