• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
It is an experimental device that will make my mind that most powerful force on earth! More powerful than this tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic