MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

fetching a DB2 cursor into a working storage table

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
ironponygrl
Beginner


Joined: 22 Mar 2013
Posts: 21
Topics: 7
Location: Fort Worth, TX

PostPosted: Thu Mar 27, 2014 3:02 pm    Post subject: fetching a DB2 cursor into a working storage table Reply with quote

i'm working on a legacy mainframe system written in COBOL, CICS and Natural. I find many places in this old system where a cursor is opened then fetched into a working storage table and closed. Usually its not a lot of data, just like all the rows for a single individual. is there still a reason to do this kind of processing? doesnt scrollable cursors take care of any previous issues?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu Mar 27, 2014 3:44 pm    Post subject: Reply with quote

ironponygrl,

If you are reading the data from the cursor and moving into a working storage table then I think it has to do with LOCKS and avoiding deadlocks. You probably are working with the uncommitted data in your working storage. If it is a batch process, I believe you quickly fetch the data from the table usually at midnight and then release the lock so that other applications or online systems can perform their updates.

Having said if you just want to read the uncommitted data, you can get around it by simply specifying WITH UR on the cursor.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ironponygrl
Beginner


Joined: 22 Mar 2013
Posts: 21
Topics: 7
Location: Fort Worth, TX

PostPosted: Fri Mar 28, 2014 11:53 am    Post subject: Reply with quote

thanks K, I think that whats going on is just really old technique that can be accomplished in another way
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group