Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!usenet.ins.cwru.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!drycas!synful From: synful@drycas.club.cc.cmu.edu (Marc Shannon) Newsgroups: comp.lang.pascal Subject: Re: VMS problem Message-ID: <163.25b11624@drycas.club.cc.cmu.edu> Date: 15 Jan 90 05:15:32 GMT References: <21704@uflorida.cis.ufl.EDU> Followup-To: comp.lang.pascal Organization: Computer Club, Carnegie-Mellon University Lines: 29 In article <21704@uflorida.cis.ufl.EDU>, dor@beach.cis.ufl.edu (Douglas R. Oosting) writes: > BEGIN > REPEAT > REWRITE (PInfo); > WRITE (Pinfo, TheInfo^); , Error := Continue > UNTIL (Status(PInfo)=0); try >= > FIND (Pinfo, 1); > UNLOCK (Pinfo); > END; Presuming that you've got the file opened with Sharing := ReadWrite (or ReadOnly but not None which is the default, I think), it should work, although I'm not quite sure why you'd get into an infinite loop. You might want to try it with the above mentioned changes. The first one is the "proper" to handle possibly-failing-I/O's and the second is useful because you might be getting -1 which means that the file pointer is at EOF. All non-positive values are generally OK. --Marc -- +-----------------------------------------------------------------------------+ | Marc Shannon Internet Address (Bitnet name) | | VAX Systems Programmer SYNFUL@DRYCAS.CLUB.CC.CMU.EDU (DRYCAS) | | Carnegie-Mellon University R602MS5U@VB.CC.CMU.EDU (CMCCVB) | | (412) 268-6290 "I mean, really, what could possibly go wrong?" | +-----------------------------------------------------------------------------+