[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

159.0. "Does DATA_FILE LOCK set an EXCLUSIVE lock ... " by TAV02::CHAIM (Semper ubi Sub ubi .....) Tue Mar 03 1992 15:02

Could someone tell me if DATA_FILE LOCK puts an EXCLUSIVE lock on the record; a
customer claims that he is using this function and even though one user has
LOCKed a particular record, other users are able to READ the record. 

Thanks,

Cb.
T.RTitleUserPersonal
Name
DateLines
159.1No special "magic"SHALOT::NICODEMWho told you I'm paranoid???Tue Mar 03 1992 16:5920
	Chaim,

	I'm not sure if this answer will help you, but DATA_FILE LOCK simply
calls the standard RMS routines already built into ALL-IN-1 to do data file
locking.  And as far as I can tell from the code, this is *not* an exclusive
lock.

	In fact, you can see this at the user level by calling up an entry form
and starting to change a record.  Then, from another process, call up the same
entry form *in INQUIRE mode*.  You'll find that you *CAN* still access that same
record for Read only.  However, if the second process calls the entry form in
any other mode, you will get the traditional ALL-IN-1 error that the record is
in use.

	So DATA_FILE LOCK doesn't "bypass" any of this; it merely allows you to
call the existing routines directly.  My only suggestion would be to have the
application actually try to access the record for write first, which would
fail if there was a lock already on the record.

	F