From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX"  1-JUL-1991 20:44:07.73
To:	ARISIA::EVERHART
CC:	
Subj:	Re: many processes accessing one file

From:	RELAY-INFO-VAX@CRVAX.SRI.COM@SMTP@CRDGW2
To:	Everhart@Arisia@MRGATE

Received:  by crdgw1.ge.com (5.57/GE 1.101)
	 id AA10681; Mon, 1 Jul 91 13:29:08 EDT
Received: From UCBVAX.BERKELEY.EDU by CRVAX.SRI.COM with TCP; Mon,  1 JUL 91 07:42:44 PDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA01201; Mon, 1 Jul 91 07:41:41 -0700
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: 1 Jul 91 14:41:00 GMT
From: psuvm!esoc!mtolman@psuvax1.cs.psu.edu
Subject: Re: many processes accessing one file
Message-Id: <91182.160129MTOLMAN@ESOC.BITNET>
References: <840026@hpdtczb.HP.COM>, <481@txsil.lonestar.org>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

Opening the file as readonly,share (for reading processes) is fine if your
algorithm avoids record clashing.  If not then a user open routine is required
that will set the read regardless flag in the RAB (record access block).  This
is required also for the writing process.

eg.

       integer*4 function user_open(ra_fab,ra_rab,ja_lun)

       implicit none

       include '($fabdef)'
       include '($rabdef)'
       include '($syssrvnam)'

       integer*4 ja_lun
     &           j_status

       record /fabdef/  ra_fab,
     &        /rabdef/  ra_rab

!      RMS file open
       j_status = sys$open(ra_fab)

!      Set flag to read regardless on locked records
       ra_rab.rab$l_rop = ra_rab.rab$l_rop .or. rab$m_rrl

!      Connect with modified RAB to the file
       if(j_status) j_status = sys$connect(ra_rab)

!      Set function status
       user_open = j_status

       return

       end



Hope this is of some use.

Mike Tolman (E.S.O.C DARMSTADT)

