Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!uwvax!rutgers!im4u!ut-sally!utah-cs!utah-gr!uplherc!nrc-ut!nrcvax!kvc From: kvc@nrcvax.UUCP (Kevin Carosso) Newsgroups: comp.os.vms Subject: Re: How do you flush buffers? Message-ID: <1288@nrcvax.UUCP> Date: Fri, 13-Nov-87 21:31:59 EST Article-I.D.: nrcvax.1288 Posted: Fri Nov 13 21:31:59 1987 Date-Received: Tue, 17-Nov-87 03:29:48 EST References: <1655@uqcspe.OZ> Reply-To: kvc@minnie.UUCP (Kevin Carosso) Organization: Network Research Corp. Oxnard, CA Lines: 27 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