IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Fetching 1 result set defined on 2 GTT,cobol-Stored Proc


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mad_guy
Currently Banned

New User


Joined: 15 Jan 2010
Posts: 31
Location: India/UK

PostPosted: Mon Feb 15, 2010 5:06 pm
Reply with quote

IF I declare two resultset in stored proc,and in the cobol code open two cursor defined on two different global temporary table,what will happen?

In my shop...java calles the cobol -db2 stored proc,now if I define two cursor on two GTT and open same time..How Java will get those result set..? one by one...or on the same time?
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Mon Feb 15, 2010 7:48 pm
Reply with quote

Both result sets will be available to Java once your stored procedure does its job.
Back to top
View user's profile Send private message
mad_guy
Currently Banned

New User


Joined: 15 Jan 2010
Posts: 31
Location: India/UK

PostPosted: Mon Feb 15, 2010 8:16 pm
Reply with quote

So..java will get those on same time or in any order?
I have not ever seen how java gets those result set.
Can any one let me know about it Or send me the screenshots?
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Mon Feb 15, 2010 8:22 pm
Reply with quote

What do you mean by order ?
Its similar to : you insert two rows in a table and then issues the select stmt ; you will be getting both the rows.

Even i have not seen how java internally gets the result set.
Once return comes from the stored procedure you need to associate and allocate the result sets within java.

Google
"Writing a program to receive the result sets from a stored procedure"
Back to top
View user's profile Send private message
mad_guy
Currently Banned

New User


Joined: 15 Jan 2010
Posts: 31
Location: India/UK

PostPosted: Mon Feb 15, 2010 8:54 pm
Reply with quote

But,
Is it confirm that sending two resultsets on same time is possible ?
Java will get those both samtime..or once at a time ?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Feb 15, 2010 8:55 pm
Reply with quote

With due respect to Dick,
dbzTHEdinosauer wrote:
Two of these three Redbooks may help you with this and future inquiries:

DB2 for z/OS Application Programming Topics

DB2 9 for z/OS SPs: Through the CALL and Beyond

DB2 for z/OS SPs: Through the CALL and Beyond
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Feb 15, 2010 9:01 pm
Reply with quote

mad_guy wrote:
But,
Is it confirm that sending two resultsets on same time is possible ?
Java will get those both samtime..or once at a time ?
Answer is ... it depends. DB2 store procedure will send the data as a contiguous string, it depends on the Java Application (most probably a front-end screen) how that taclkes this string - one long string of information or two different chunks of information...
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top