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



Hi,

just FYI:
As soon as your are working with commitment control, you'll will have no
luck with Extender (N).
A record locked under commitment control can only be released by the next
commit or rollback.
In my experience most of the record locks were caused by too big
transactions that hold a bunch of records in different files.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von Booth Martin
Gesendet: Tuesday, 20. January 2009 01:16
An: RPG programming on the IBM i / System i
Betreff: Re: Generically Handling Record Locks in *PSSR

The "in use" flag works, but it is overkill in my opinion. The easiest
solution I believe is to add the (n) extender to the chained file, and
then at the update of the record, chain again. Save a copy of the
fields you care about in a data structure when you do that first chain
(n) and then make a compare at the time of your chain for update.
(You really only care about the fields you can update, not all of the
fields. If Sally changes the zip code and Betty changes the credit code
then there is no conflict.)

David Wright wrote:
Thanks to all for the quick replies. After my research I was fairly
certain
the answer was going to be no, unless all my apps just happened to be
cycle-driven with the only read as the first line of the C-specs. I find
it
hard to believe that anyone ever really wrote code like that, but they
added
the option so someone must have.

I was a little over-dramatic what I said they had no logic for error
handling. The did in fact have a *PSSR on every file, but all it did was
dump the program which is equivelant to no logic in my book.

As for the suggestions to use 'In Use' flags or similar record-locking
techniques, that is part of what we have been doing. The first step is to
see WHY the lock happened, which as Booth guessed is often poorly written
code which locks records in update files unneccesarily. We have fixed a
lot
of bad code the past month or so. Some of it years (think 6 to 8 years)
old....

I definitely did not want to automatically hide the problem, but just come
up with a recovery that did not involve dumping the user's program.

Anyhow, thanks for the input.



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.