Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
For fetch only vs With ur

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
kranthikumarb

Active User


Joined: 02 Jan 2009
Posts: 114
Location: Hyderabad

PostPosted: Wed May 29, 2013 3:54 pm    Post subject: For fetch only vs With ur
Reply with quote

Hi,

I searched the forum for this topic, although I found few, but didn't give me answer to my doubt. Can someone please help me with the below.

I have 2 jobs, one updates; other extract data from the table space.

The extract job has cursor that doesn't have any one of the below clauses

WITH UR
FOR FETCH ONLY.

Because both jobs run at the same time, I am getting a -911 on the extract job. So I was thinking of using UR in the select cursor. But the clients didn't want to see un committed data. So I was thinking of using FOR FETCH ONLY. Before using that I wanted to check the isolation level it is using. I submitted a command -DISPLAY DB(ZDXY0005) SPACENAM(TSXYX12) CLAIMERS when a long running select query is executing with "WITH UR" , "FOR FETCH ONLY" and with out any of these two. In all three instances the tabls space is in RW mode and the isolation level is (CS,C).

Surprising to see a CS,C when using WITH UR.

I can set the pred and successor conditions, but there are many reading jobs.

Prefer to do it via program.

Can someone help me am I doing something wrong in the display statement?

"FOR FETCH ONLY" - Is this same as WITH UR but will give committed data without locking any pages?
Back to top
View user's profile Send private message

kranthikumarb

Active User


Joined: 02 Jan 2009
Posts: 114
Location: Hyderabad

PostPosted: Wed May 29, 2013 4:12 pm    Post subject:
Reply with quote

Oopsy.... I found the extract program already has "FOR FETCH ONLY" in the declare.

Now more problems icon_sad.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed May 29, 2013 6:45 pm    Post subject:
Reply with quote

Hello,

It is NOT a good idea to extract data from a table while it is being updated. There is a strong possibility that the extract will contain incomplete or corrupt entries. . .
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Thu May 30, 2013 5:29 pm    Post subject:
Reply with quote

Refer this - http://ibmmainframes.com/about31975.html
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
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts Need DB2 query to fetch previous row ! Chandan1993 DB2 10 Sat Jun 03, 2017 10:43 am
No new posts Multi row fetch - "for read only... Nileshkul DB2 3 Sun Aug 14, 2016 12:52 am
No new posts JCL to fetch schedule status from act... parasmalik20 CA Products 1 Thu Jun 02, 2016 7:11 pm
No new posts ABEND due to FETCH FAILED jackzhang75 ABENDS & Debugging 17 Thu Mar 10, 2016 3:08 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us