× 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'd disagree with that statement.

The (N) no lock works just fine with commitment control. You simply
need to consider what makes up a transaction and wait to make any
updates till the program has all the information needed to make all
required updates.

With or without commitment control, the idea behind using (N) is that
the record isn't locked while the user is thinking.

With commitment control, you simply need to realize that you want to
get all the thinking out of the way for the entire transaction before
you start making updates.

Charles

On Tue, Jan 20, 2009 at 1:17 AM, Birgitta Hauser <Hauser@xxxxxxxxxxxxxxx> wrote:
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.


--
---------------------------------
Booth Martin
http://www.Martinvt.com
---------------------------------

--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.