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 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.
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.