As someone else said, using data structures (before and after) can be used
to test for changes. I usually used that method, though, to determine if,
for an interactive update, I wanted to do the update at all.

That is, on the first CHAIN to the file I use CHAIN(N) so that, if the @#$%
user walks away before pushing Enter, the record doesn't get locked. Then
when the user presses the Enter key, retrieve the record again (just CHAIN)
and see if someone else came in before s/he finished. If so, redisplay with
a message and the new data elements.

By the way, why would you not want to update the record if the display file
fields have not changed? Agreed it's a waste of time, but what's a couple
of microseconds? Figured there must be another reason.

Jerry C. Adams
IBM i Programmer/Analyst
Problems are the price you pay for progress. -Branch Rickey

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-2025 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.