Getting values from cursor of a external DB2 stored proc



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Getting values from cursor of a external DB2 stored proc

Postby yogeshvalhe » Wed Oct 10, 2012 11:48 pm

Hello,

I have to use a cursor returned from DB2 stored Proc (extrenal) in COBOL program. Can anyone tell me how it is done.

To elaborate, there is one external DB2 stored Proc (external) written in PL/SQL in DB2. It will retrieve values in cursor. And I need to access the values fromthe cursor and use it for further processing. Does anyone has any experience in using such external DB2 stored Proc in COBOL program?

Thank you,
Yogesh
yogeshvalhe
 
Posts: 22
Joined: Wed Aug 18, 2010 3:32 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Getting values from cursor of a external DB2 stored proc

Postby NicC » Thu Oct 11, 2012 4:13 am

Presumably the people who gave you that assignment so why not ask them?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Getting values from cursor of a external DB2 stored proc

Postby yogeshvalhe » Thu Oct 11, 2012 4:31 am

We have just started using it recently and at this point, no one has clear idea.
At this moment, we are just using the SQL return code and SQL Messages at this moment, and we would like to get more data from the external stored proc.

I understand its little difficult to get the data however, any pointers to 'good' online material would be helpful.

Tks,
Yogesh
yogeshvalhe
 
Posts: 22
Joined: Wed Aug 18, 2010 3:32 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Getting values from cursor of a external DB2 stored proc

Postby enrico-sorichetti » Thu Oct 11, 2012 4:56 am

what happened when You googled with return cursor stored procedure db2 ???
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3002
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Getting values from cursor of a external DB2 stored proc

Postby GuyC » Thu Oct 11, 2012 4:30 pm

I can explain it to you, but i can not understand it for you.
GuyC
 
Posts: 315
Joined: Tue Aug 11, 2009 3:23 pm
Has thanked: 1 time
Been thanked: 4 times

Re: Getting values from cursor of a external DB2 stored proc

Postby yogeshvalhe » Thu Oct 11, 2012 4:55 pm

The example is good to start with. Yesterday, someone told me, RESULT SET is the way do it.
If I have any questions, I will post them again. And thank you for the sample program.
yogeshvalhe
 
Posts: 22
Joined: Wed Aug 18, 2010 3:32 pm
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post