View previous topic :: View next topic |
Author |
Message |
SureshKumar Intermediate
Joined: 23 Jan 2003 Posts: 211 Topics: 21
|
Posted: Tue Jul 06, 2004 8:10 am Post subject: Stored Procedure to access multiple instances of database |
|
|
Hi All,
I have a 'odd' requirement to retrieve data from multiple instances of a table thru a Stored Procedure returning multiple |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue Jul 06, 2004 8:46 am Post subject: |
|
|
Sureshkumar,
The cursor will be live as long as you don't execuete the GOBACK command in the stored procedure. YOu can retrieve the result set from the 5 cursors as long as they don't exceed the 32k limit.
Code: |
PROCEDURE DIVISION USING SP1-IN-PARM
SP1-CURSOR1-OUTPUT1
SP1-CURSOR2-OUTPUT2
SP1-CURSOR3-OUTPUT3
SP1-CURSOR4-OUTPUT4
SP1-CURSOR5-OUTPUT5.
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
SureshKumar Intermediate
Joined: 23 Jan 2003 Posts: 211 Topics: 21
|
Posted: Tue Jul 06, 2004 8:52 am Post subject: |
|
|
Thanks Kolusu, but the SP is not the one that will do the fetch, the SP will issue a goback or the control is returned to the client and that application on the Distributed box is the one doing all the fetch's. thanks |
|
Back to top |
|
|
SureshKumar Intermediate
Joined: 23 Jan 2003 Posts: 211 Topics: 21
|
Posted: Tue Jul 06, 2004 12:44 pm Post subject: |
|
|
Ok, I tested it. The Cursor is live for both instances of the cursor after return to the client. |
|
Back to top |
|
|
|
|