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

How data buffering happens in CURSOR Fetch


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

New User


Joined: 21 Dec 2006
Posts: 2
Location: chennai

PostPosted: Tue Jan 30, 2007 6:45 am
Reply with quote

hai,

when we are using cursor in a prog.after we declare cursor in w.s.s we code for fetch only or for update only why do we do this.

and when we have declared cursor for fetch will the data be brought to the buffer when open the cursor or when we use select stmt,how will the data be brought
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jan 30, 2007 6:53 am
Reply with quote

Hello,

Please post this in the DB2 forum. Your code may be COBOL, but this is a DB2 questions.

When you open the cursor, the set of matching rows will be retrieved/ordered. When you issue the fetch, one row at a time will be returned to your program.

If your program is only going to read rows, do NOT specify update. Systems that read rows for update when it is not needed often have performance problems. Tasks have to wait for locked rows that would have been available.
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 Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top