|
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Pete Helgren
Sent: Monday, September 10, 2007 5:14 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Record locking 101
Booth/Walden,
Yes. Whether I use READx/CHAIN I am using the (n) extender
not to lock the record. The only exception is when I
actually want either update or delete the record and then I
am exclusively using Chain (without the
extender) to retrieve the record. That is what trigger the
question.
If I update or delete, the record lock should be gone after
those op codes have executed, correct?
I am guessing somewhere there is another READx or CHAIN I
missed that is still locking record. But that is what brings
me to the second question. What would a lock look like after
a Chain(n) on the record?
Would there even be an entry showing a lock when I use the
DSPRCDLCK command?
Thanks,
pete
Booth Martin wrote:
Question: You are using the (n) extender on the get of the recordposting program
that fills the screen, right?
Pete Helgren wrote:
I had a program that was originally written in such a way that it
would read/chain and lock a record while the user was in the
maintenance screen. That would cause problems for a
Thanks tothat could also be run while records were being maintained. So I
needed to eliminate the lock in the maintenance program.
supposedly no lockthis list, I modified the program so that the record data is now
retrieved into a data structure temporarily (with
the locks onon the record) and then when the user presses enter the record is
retrieved again from the DB, the data updated and written without
delay so that the lock is very transitory.
Now comes time to test it. When this was originally reported as a
problem, I looked at the code and found the flawed design and set
about fixing it. I never looked at the job to see what
(shouldn'tthe record actually looked like. So now I am viewing the record
locks on the file and I am not sure what I *should* see. This is
what I do see when I am in the record in the "view" mode
the lock onbe a lock on the
record)
Record Lock
Number Job User Number Status Type
494 QPADEV000R PETE 861530 HELD UPDATE
So I am guessing that I still have some more work to do, yes?
An UPDAT or DELET after a CHAIN would effectively release
--the record, correct?
What should the Lock Type be when you are just reading through the
records with no need to update?
Thanks,
Pete
This is the RPG programming on the AS400 / iSeries (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 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.