By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,032 Members | 811 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,032 IT Pros & Developers. It's quick & easy.

Handling return sets from COBOL stored procedures in JAVA invoking program

P: 2
Hi, I need to handle the return set from COBOL stored procedure from my invoking Java program. I do not know, how many rows the stored proc SQL fetches.I have declared the cursor in that proc, but i don't know how to return the rows the cursor has opened and I don't know how to handle the return set from the proc in my java code.

My main problem with that proc is that whether I can retun the result set from the proc without closing the cursor in that proc or I have to fetch that rows to some host variables in that proc and move that to out parameter fields,then close the cursor in the proc.

Do I need to have the out parameter for returning the result sets from COBOL stored proc to invoking java prog,and If so, what will be the data type for that
out parameter.

Another doubt is that , do there is any parameter type like SYSREF CURSOR (which is in oracle stored procedures) in DB2.I am confused about handling the return sets in my java prog.

I am working in DB2 database, OS/390 environment.
Can anyone tell me how to handle the result set from cobol stored proc in my invoking java program with an simple example.
Nov 24 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.