Home > Archive > Cobol > December 2007 > READ on a locked record
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
READ on a locked record
|
|
| Roger While 2007-12-10, 6:55 pm |
| What do cuurent systems do with a file
opened INPUT and attempting to read a
record that is locked by another run-unit?
MF allows this (against the standard).
Others?
Roger
| |
| William M. Klein 2007-12-10, 6:55 pm |
| Roger,
Be careful when you say "the Standard". In this case, I believe you are
referring to the ISO 2002 Standard. (and the '85 Standard, which is the only
ANSI/ISO Standard that has any "fully conforming implementations" didn't have
file-sharing/record-locking at all.)
However, consider the fact that the X/Open CAE specifically says (and this is
NOT in the '02 ISO Standard),
Page 137
"1. For files opened for input, READ or READ WITH LOCK statements will not
acquire a record lock."
Page 138
"Application Usage
Currently a READ statement without implicit or explicit lock, and this includes
all READ statements for a file opened for input, may not detect a record lock
(see Appendix A, Future Directions)."
Page 173
"When a (sequential) READ, without explicit or implicit lock, encounters a
locked record, it is currently implementation-dependent whether the statement is
successful. X/Open hopes to resolve this issue in the future by defining either
unsuccessful or successful completion of the statement."
* * *
As the X/Open specification FAR pre-dates the ISO 2002 Standard and most of
those implementations that currently have file-sharing/record-locking actually
did so in conformance to (and sometimes based on) the X/Open specification, this
explains differences between the '02 Standard and current implementations - as
well as differences among current implementations.
--
Bill Klein
wmklein <at> ix.netcom.com
"Roger While" <simrw@sim-basis.de> wrote in message
news:fjjm20$k17$01$1@news.t-online.com...
> What do cuurent systems do with a file
> opened INPUT and attempting to read a
> record that is locked by another run-unit?
>
> MF allows this (against the standard).
> Others?
>
> Roger
>
>
| |
| Roger While 2007-12-10, 6:55 pm |
| Top post :-)
Thanks Bill,
It's a bit confusing what implementors do (and what is considered
"standard") and what a simple person should interpret.
Gezz.
Thanks, as always, for your knowlege.
Roger
"William M. Klein" <wmklein@nospam.netcom.com> schrieb im Newsbeitrag
news:V7f7j.58923$KC6.5299@fe07.news.easynews.com...
> Roger,
> Be careful when you say "the Standard". In this case, I believe you
are
> referring to the ISO 2002 Standard. (and the '85 Standard, which is the
only
> ANSI/ISO Standard that has any "fully conforming implementations" didn't
have
> file-sharing/record-locking at all.)
>
> However, consider the fact that the X/Open CAE specifically says (and
this is
> NOT in the '02 ISO Standard),
>
> Page 137
> "1. For files opened for input, READ or READ WITH LOCK statements will
not
> acquire a record lock."
>
> Page 138
> "Application Usage
> Currently a READ statement without implicit or explicit lock, and this
includes
> all READ statements for a file opened for input, may not detect a record
lock
> (see Appendix A, Future Directions)."
>
> Page 173
> "When a (sequential) READ, without explicit or implicit lock,
encounters a
> locked record, it is currently implementation-dependent whether the
statement is
> successful. X/Open hopes to resolve this issue in the future by defining
either
> unsuccessful or successful completion of the statement."
>
> * * *
>
> As the X/Open specification FAR pre-dates the ISO 2002 Standard and most
of
> those implementations that currently have file-sharing/record-locking
actually
> did so in conformance to (and sometimes based on) the X/Open
specification, this
> explains differences between the '02 Standard and current
implementations - as
> well as differences among current implementations.
>
> --
> Bill Klein
> wmklein <at> ix.netcom.com
> "Roger While" <simrw@sim-basis.de> wrote in message
> news:fjjm20$k17$01$1@news.t-online.com...
>
>
|
|
|
|
|