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

Conference vmszoo::rms_openvms

Title:RMS asks, 'R U Journaled?'
Moderator:STAR::TSPEERUVEL
Created:Tue Mar 11 1986
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3031
Total number of notes:12302

3013.0. "$PUT with UIF window still there?" by QUARK::LIONEL (Free advice is worth every cent) Thu Feb 20 1997 12:52

Does RMS still have the "window" where a $PUT with RAB$V_UIF set releases the
lock on the target record, if any?

				Steve
T.RTitleUserPersonal
Name
DateLines
3013.1UIFSTAR::EWOODSThu Feb 20 1997 16:5833
  Yes.  It is well documented in Guide to File Applications (Section 8.2.2 -
  Inserting Records).  After describing the update-if (RAB$V_UIF) option, it 
  provides a warning:

     Be careful with automatic record locking when you use this option
     for a shared file because the Put service briefly releases record
     locks appplied by the Get or Find service before the Update operation
     begins.  This could permit another record stream to delete or update
     the record between the time that the program invokes the Put service
     and the beginning of the Update service.

     Consider using the Update service instead of the update-if option
     with the Put service to update an existing record in a shared file.
 
  It is also documented in the description of RAB$V_UIF in the RMS Reference
  manual.
 
  This has been documented for many, many versions and years.  I have 
  always presumed that whomever the engineer was that documented this did 
  a sufficient investigation to conclude best to document it as a "feature."
  My take is that it was an option added after the fact but it conflicts
  with RMS's basic record I/O design, which has no dependency between a get 
  (or find) and a put (but does for an update).  The design of update requires 
  a get (or find) to lock the record and the update piggybacks on this record 
  lock.   So update provides users with a way of avoiding this window with 
  shared users and automatic record locking.

  It's not on my current list of needed changes and I have never seen it on any 
  old lists.  So at this point in time, there are no plans to change this. 
  But, of course, I am always open to input.

  -- Elinor
3013.2QUARK::LIONELFree advice is worth every centThu Feb 20 1997 17:455
It didn't always work this way - RMS changed the behavior sometime around
VMS V4.  I know it's documented - I just wondered if there was any change
in status.

				Steve