× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



" I like Henrik's idea of including an update counter in a record,"

Why not use the built-in Db2 functionality for this?



-----Original Message-----
From: Nathan Andelin [mailto:nandelin@xxxxxxxxx]
Sent: Tuesday, December 19, 2017 12:39 PM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-l@xxxxxxxxxxxx>
Subject: Re: 5250 and un-do

Just to follow up on some of the comments so far. Good points all around regarding database normalization.

I've never found any use for locking a record while it is displayed, given a multi-user environment. I shake my head in awe.

I like Henrik's idea of including an update counter in a record, and checking to see if it has changed since the current user last read the record. That's more efficient and easier to implement than comparing multiple record buffers in memory, each containing a copy of a record in a different state.

For applications that are only required to update say one column in a row, you end up needing a record buffer on the update operation that is distinguished from the record buffer used in the read-from-screen operation. Use an assignment statement to copy a column value from one buffer to the other. An SQL Update statement does that, under the covers.

Though it would be possible, I wouldn't expect a super-basic utility like DFU to have an undo key. Use cases for undo fall in the realm of application development.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.