From: CSBVAX::MRGATE!@KL.SRI.COM:info-vax-request@kl.sri.com@SMTP 17-NOV-1987 04:43 To: EVERHART Subj: Re: How do you flush buffers? Received: from ucbvax.Berkeley.EDU by KL.SRI.COM with TCP; Mon 16 Nov 87 00:54:23-PST Received: by ucbvax.Berkeley.EDU (5.58/1.26) id AA12982; Mon, 16 Nov 87 00:48:10 PST Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-vax@kl.sri.com (info-vax@kl.sri.com) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 14 Nov 87 02:31:59 GMT From: uplherc!nrc-ut!nrcvax!kvc@gr.utah.edu (Kevin Carosso) Organization: Network Research Corp. Oxnard, CA Subject: Re: How do you flush buffers? Message-Id: <1288@nrcvax.UUCP> References: <1655@uqcspe.OZ> Sender: info-vax-request@kl.sri.com To: info-vax@kl.sri.com In article <1655@uqcspe.OZ> miw@uqcspe.cs.uq.oz (Mark Williams) writes: >G'day, > I have a small problem with writing to files that perhaps someone can >help me with. Mark goes on to explain that he creates a shareable log file, but the data is not getting flushed out to that file. What you need to do is call the RMS routine $FLUSH to get your data out of RMS's buffering mechanisms and into the actual file. $FLUSH, documented in the RMS manual, requires the address of the RAB (Record Access Block) of the record stream to be flushed. You can get the RAB of a Pascal file variable by calling the Pascal RTL routine PAS$RAB. PAS$RAB is documented in the Pascal manual. It's a simple call as well, taking a Pascal file variable returning the address of the RAB. I have actually done this, and it works very well. If you require, I can try to dig up my code, but it's no longer handy to get to. You'll need to choose how often you want to flush. Since you probably don't write to your log file with ferocious intensity, else you'd have filled up you disks by now, you may as well do a flush after every write. That's what I did. /Kevin Carosso kvc@nrcvax.uucp Network Research Co. kvc%nrcvax@trwind.trw.com kvc@engvax.scg.hac.com kvc@ymir.bitnet