Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

What is Double Update in Natural?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
View previous topic :: :: View next topic  
Author Message
Gatbys

New User


Joined: 04 May 2008
Posts: 3
Location: Stockholm, Sweden

PostPosted: Mon Jun 01, 2009 2:58 pm    Post subject: What is Double Update in Natural?
Reply with quote

Hi,

While doing READ BY ISN, I have encountered a term "Double Update".
Can anyone please explain what is "Double Update"?

Thanks for your time.

Cheers,
Gatbys.
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Jun 02, 2009 12:32 am    Post subject:
Reply with quote

Working in Natural for 12 years, this is the first time I've heard of the term.

You said "I have encountered a term ...". Can you specify where? I couldn't find it in any of the formal manuals.

O.
Back to top
View user's profile Send private message
Ralph Zbrog

New User


Joined: 21 Nov 2009
Posts: 58
Location: California

PostPosted: Fri Dec 11, 2009 1:39 pm    Post subject: Reply to: What is Double Update in Natural?
Reply with quote

This problem is more often referred to as "record migration" or "block migration." Often DBAs will recommend READ BY ISN as a means to avoid double updates.

Let's say that your company has had a banner year, so all employees are getting a 10% raise. The most efficient way to process an entire file is with a READ PHYSICAL, so you write
Code:
DEFINE DATA LOCAL
1 EMP    VIEW EMPLOYEES
  2 PERSONNEL-ID
  2 SALARY (1)
END-DEFINE
*
R.
READ EMP PHYSICAL
  ASSIGN SALARY (1) = SALARY (1) * 1.10
  DISPLAY PERSONNEL-ID
          'New/Salary' SALARY (1)
  UPDATE (R.)
  ---  et logic  ---
END-READ
END

It so happens that the first record processed has a salary go from 99,900 to 109,890. The record length has increased by 1 byte, but the Adabas block was full prior to the increase and the updated record will no longer fit back in this block. The record automatically is migrated by Adabas to another block, say block 100. Since you are performing a physical read, that same record will be processed again when block 100 is reached, receiving another 10% increase.

READ BY ISN avoids the problem, because each record/ISN is processed only once, regardless of block migrations.
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 -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
This topic is locked: you cannot edit posts or make replies. Natural ADABAS Opening with CTS enikhilk Mainframe Jobs 0 Wed Nov 30, 2016 5:37 pm
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts Updating Cursor row withour using FOR... chandan.inst DB2 15 Tue Nov 08, 2016 11:17 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us