Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!RICHTER.MIT.EDU!krowitz From: krowitz@RICHTER.MIT.EDU (David Krowitz) Newsgroups: comp.sys.apollo Subject: Re: ms_$mapl and FORTRAN I/O Message-ID: <8904281632.AA07975@richter.mit.edu> Date: 28 Apr 89 16:32:25 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 26 Fortran unformatted files do not contain any end-of-record characters. They contain a record count at the beginning of each record. The contents (and exact location) of the record count is different depending on whether you have an REC file or an UNSTRUC file. You should not be able to do an unformatted Fortran read on a UASC file. Under SR9, unformatted Fortran files are REC type files, under SR10 they are supposed to be UNSTRUCT type files, although SR10 will read either type, it will only create the latter. With the REC type files, each record in the files contains a 32-bit counter at the beginning of the record. The contents of this counter is the number of bytes in the record including the counter (ie. bytes of data + 4). The counter is followed immediately by the data. All floating point and integer data is word-aligned on 16-bit boundaries. Since the record count is a integer, all records start on even byte addresses. Of course, you also must remember that REC files (and UASC files) have a 32-byte headers and that the first record count starts after that header. -- David Krowitz krowitz@richter.mit.edu (18.83.0.109) krowitz%richter@eddie.mit.edu krowitz%richter@athena.mit.edu krowitz%richter.mit.edu@mitvma.bitnet (in order of decreasing preference)