aspose file tools
The moose likes JDBC and the fly likes  problem : callable statement / COBOL services How to get ResultSet(s) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark " problem : callable statement / COBOL services How to get ResultSet(s)" Watch " problem : callable statement / COBOL services How to get ResultSet(s)" New topic
Author

problem : callable statement / COBOL services How to get ResultSet(s)

Flo
Greenhorn

Joined: Aug 28, 2003
Posts: 12
LO

For a professionnal project i have to work with DB2 data returned by COBOL services.
These COBOL services take several blocs in input and several blocs in outpout.
I call one callable statement calling the needed COBOL services.

like this :
st = con.prepareCall("{call TI01.PCPSTK01 (?,?,?,?,?,?)}");
st.setString(1,service+new String(new char[32]));
st.setString(3,inputString);
st.registerOutParameter(2,Types.VARCHAR);
st.registerOutParameter(4,Types.VARCHAR);
st.registerOutParameter(5,Types.VARCHAR);
st.registerOutParameter(6,Types.VARCHAR);
st.execute();
/*
ResultSet rs = st.getResultSet();
if(rs==null)
System.out.println("Resultset null");
while(st.getMoreResults())
System.out.println("OK");
*/
String[] = new String[3];
output[0] = st.getString(4);
output[1] = st.getString(5);
output[2] = st.getString(6);
The output[] values are my returned datas concatenated. For each output (output[x]) i have to make many substring() to extract the resulting datas. So i would like to get one or more Resulsted instead these String containing contenated datas.
Is it possible ???
When i execute the commented code, the result is : Resultset null

Tx for your help
Flo
[ August 28, 2003: Message edited by: Florent LOTHON ]

Sun Certified Enterprise Architect<br />Sun Certified Web Component Developer for J2EE platform<br />Sun Certified programmer 1.4
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: problem : callable statement / COBOL services How to get ResultSet(s)
 
Similar Threads
CallableStatement w Oracle 9i
Call to Stored Proc Returns 1st Row of RS into callableStmt
null resultset
Error executing Oracle function from JSP page
got error: Invalid column index