Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Fetching 1 result set defined on 2 GTT,cobol-Stored Proc
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    Post subject:
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    Post subject: Reply to: Fetching 1 result set defined on 2 GTT,cobol-Store
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    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Mon Feb 15, 2010 8:55 pm    Post subject:
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

Senior Member


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

PostPosted: Mon Feb 15, 2010 9:01 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts COBOL Programming Sandpit? jodrisco COBOL Programming 6 Wed Apr 12, 2017 3:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us