If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Cobol-DB2 SP using result set

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-06-11, 21:50
newdb2db newdb2db is offline
Registered User
 
Join Date: Apr 2011
Posts: 3
Cobol-DB2 SP using result set

Hi,

I need your suggestion.

Scenario:
Calling a Cobol-DB2 ( V8) on z/OS Stored procedure from .NET application.
The stored procedure using result set option.
Hence, in the SP, I am opening the Cursor with-Return option.

Now, the SP is called from .NET application. So, it will invoke the open cursor statement in the SP.
Here I am assuming, the result data of this open cursor may be approx 70 MB.

Now my concern is when and how the data has been traveled from DB2 side to .NET application side.

The DB2 Connect RQRIBLK is set to 32767. It means it will fetch the block size of 32767, right?

Situation 1: I have just called this SP. It will invoke the open cursor statement in the SP. Do you think all the data ( 70 MB) will travel from DB2 side and come into the application server? Please comment.

Situation 2: I called the SP. Issued Fetch statement in the .NET program for one time. Although the data size is 70 MB, but only the 1st block of data( 32 KB) travelled from DB2 side and resides in the .NET application server. It will continue use that amount of data till it ends, then it will fetch next block of data. Please comment.

I want to know which is the correct one.

Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 04-07-11, 01:26
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
No experriance with .NET. Is it using CLI/ODBC? In that case just see for yourself: IBM DB2 9.5 Information Center for Linux, UNIX, and Windows
Reply With Quote
  #3 (permalink)  
Old 04-07-11, 08:28
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
I may be wrong, but I believe that if a cursor is non-blocking data are transferred to the client one row at a time whenever the application executes a FETCH. If a cursor is blocking, data are sent one [RQRIOBLK] block at a time.
Reply With Quote
  #4 (permalink)  
Old 04-07-11, 12:38
newdb2db newdb2db is offline
Registered User
 
Join Date: Apr 2011
Posts: 3
I am just asking, how long the result data will block the real memory in DB2 buffer space. As the SP is in mainframe server, and the application is in Windows 8 ENT server, there will be a network which may be slow...so how long the result set data will be there in DB2 memory. Is that will be there as long as the DB2 thread alive or it will go as soon as the connection is established. I am using cursor with return option so that it can be a result set.
Thanks

Last edited by newdb2db; 04-07-11 at 12:45.
Reply With Quote
Reply

Tags
.net, db2 8, result set, stored procedure

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On