RE: Can the VMS DELETE statement "pend"?

From: Chris Little <littlec1_at_jaguar.uofs.edu>
Date: 10 Jun 93 13:33:13 GMT
Message-ID: <1v7d6p$km_at_gopher.cs.uofs.edu>


Thank you all for responding to my query. This response seems to represent the general consensus on the issue. Thanks again.

--
Chris Little, Programmer/DBA                    University Computing Systems
                                                University of Scranton
  LITTLEC1_at_JAGUAR.UOFS.EDU                      Scranton, PA 18510


As I understand DELETE, if the file is not locked to prevent deletion (depends
on how other processes have locked the file; and I'm not sure what locks RMS
interprets as preventing deletion), and you have delete access to the
file, RMS will remove the directory entry immediately.  However, the file
itself, and the spece it occupies (recorded in the volume bitmap), will not be
deleted until all current channels are deassigned.  Look like what happened to
you was that your import process opened the file to read it without locking it
(reasonable, as it allows other processes to read the file), then your export
process came along and deleted it.  This removed the directory entry, but since
the import process still had a channel assigned to the file (perhaps directly,
perhaps via RMS), the data were retained.  The export process created a new
file, which is now the only directory entry for the file, and began to populate
it, but ran out of space because the old file still took up its space.  When
the import process finished, it closed the old file, and RMS completed the
delete operation by freeing up the space associated with the old file.  What
you're left with is the new file (however much was written before the export
process died) and lots of free space.

I hope this helps.  You might want your export process to check whether the
import process is still active, and wait for it to complete before starting to
populate the new file.  This can be done at the DCL level by setting and
checking a particular process name, logical name (group or system), or 'lock
file'.  It can also be done within user code via the lock manager, via event
flags, via mailbox, or via the above methods.  Good luck.


                    Regards,
                    Charles Bailey


!-------------------------------------------------------------------------------
! Dept. of Genetics / Howard Hughes Medical Institute ! University of Pennsylvania School of Medicine Rm. 430 Clinical Research Bldg. ! 422 Curie Blvd. Philadelphia, PA 19104 USA Tel. (215) 898-1699 ! Internet: bailey_at_genetics.upenn.edu (IN 128.91.200.37)
!-------------------------------------------------------------------------------
Received on Thu Jun 10 1993 - 15:33:13 CEST

Original text of this message