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



Make the chain a chain with an (n) no-lock extender. Then, chain again at the time of updating. If you have several lines of intervening code, as you have here, someone someday will mess it up and it will be a bear to find the problem.

Ooohh danger! There's nothing wrong with this advice as long as you're aware that the contents of the record may have changed in the interim (by some other job.)

chain()
 (credit score = 800)
...
time passes
...
a different job changes the record -- remember, it wasn't locked! The credit score in the file is now 100.
...
if credit score > 700...
  (this asserts TRUE, despite the actual value being 100)

chain
(at this moment, the credit score value field in the RPG program is changed to 100. That might be a problem, since a bunch of calculations were based on the assertion that the credit score was high.)

Often, when doing a CHAIN(N), then a long running set of operations (like EXFMT) you need to re-evaluate the contents of the record when doing the CHAIN for update. Either that, or have some sort of comparison to be sure the record is really the same both times you CHAIN.
  --buck

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.