dbTalk Databases Forums  

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

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss problem : callable statement / COBOL services How to get ResultSet(s) in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
FlorentL
 
Posts: n/a

Default problem : callable statement / COBOL services How to get ResultSet(s) - 08-28-2003 , 08:34 AM







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


--
Posted via http://dbforums.com

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.