On Fri, Oct 17, 2008 at 9:56 AM, Doug Palme <DPalme@xxxxxxxxxxx> wrote:
In a subroutine the program sets a HIVAL on the logical and then does a
readp in order to get the highest shipping number. At this point I
believe this field is locked and no other process can access read that
record.

The record is locked, but that doesn't mean no other process could read it.

Usually anything can simply read a locked record, what can't be done
is reading the record for update (thus the other process is trying to
lock the record itself.)

If you need to prevent other processes from even just reading the
record. Then you'd want to use commitment control with commitment
lock level of *ALL (?)

it then increrments the count and writes it to a variable. The
other variables are setup and then the program finally writes a new record
to the Physical file, which at that point the lock is released correct?

Maybe. It depends on if you are using commitment control or not and
if so, what lock level you are using.

With *CHG or *CS, the yes the lock is released. With *ALL, the lock
is not released until you commit.

Note: SQL has a couple of extra lock levels (aka isolation levels).
Also, the interaction between two processes is dependent on the
isolation levels of both processes.

HTH,
Charles

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.