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
 
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 Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Reg:Displaying the particular month o... bhavana yalavarthi All Other Mainframe Topics 4 Sat Jul 08, 2017 8:13 pm
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am

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