From: CSBVAX::CSBVAX::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 12-NOV-1988 08:29 To: MRGATE::"ARISIA::EVERHART" Subj: Re: Reading files opened for batch logs Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Thu, 10 NOV 88 22:25:29 PDT Received: from ucbvax.Berkeley.EDU by KL.SRI.COM with TCP; Thu, 10 Nov 88 21:17:35 PST Received: by ucbvax.Berkeley.EDU (5.59/1.31) id AA11508; Thu, 10 Nov 88 12:11:29 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: 10 Nov 88 18:38:00 GMT From: debit.dec.com!mayank@decwrl.dec.com (The fellow who is a good sport has to lose to prove it.) Organization: Digital Equipment Corporation Subject: Re: Reading files opened for batch logs Message-Id: <8811101548.AA00684@decwrl.dec.com> Sender: info-vax-request@kl.sri.com To: info-vax@kl.sri.com > I've got a C program that I need to modify to read a file that's already > open ... What's the magic stuff to put in the FAB so I can read it? > > Peter Scott (pjs%grouch@jpl-mil.jpl.nasa.gov) Peter, What you essentially want to tell RMS is that you will share the file for read with any other process that may be writing to it (in any shape or form ;-) ). Here's what you are looking for : x.fab$b_fac = FAB$M_BIO | FAB$M_GET ; x.fab$b_shr = FAB$M_SHRGET | FAB$M_SHRPUT | FAB$M_SHRDEL | FAB$M_SHRUPD | FAB$M_UPI; I am using Block I/O, so I needed the FAB$M_BIO. Also, I am not sure whether the last FAB$M_UPI is necessary, but it doesn't hurt to put it in anyway. enjoy, - mayank vadodaria mayank%credit.com@decwrl.dec.com OR decwrl!credit.dec.com!mayank