Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!apple!amdahl!karl From: karl@uts.amdahl.com (Karl Rowley) Newsgroups: comp.lang.fortran Subject: Re: File handling in Fortran 77 Message-ID: <58CS02Sscfr.01@amdahl.uts.amdahl.com> Date: 5 Oct 90 00:03:02 GMT References: <46016@masscomp.ccur.com> <1990Sep12.215551.16135@agate.berkeley.edu> <1990Oct1.174040.16208@ux1.cso.uiuc.edu> <2153@key.COM> <28454@pasteur.Berkeley.EDU> Reply-To: karl@amdahl.uts.amdahl.com (Karl Rowley) Organization: Amdahl Corporation, Sunnyvale CA Lines: 32 In article <28454@pasteur.Berkeley.EDU> ndeng@euler.Berkeley.EDU.UUCP () writes: >In article <2144@key.COM> sjc@key.COM (Steve Correll) writes: > > >Fortran 90 permits you to specify POSITION='REWIND', POSITION='APPEND', or > >POSITION='ASIS' in the OPEN statement. The latter leaves the file position > >unchanged if the file exists and was already connected. > ^^^^^^^ ^^^^^^^^^ >Correct me if I am wrong. But how could one CONNECT to a file before OPEN it? > Look at COS (the Cray Operating System) as an example. A dataset has a position (like a tape on a tape drive) that it retains between the execution of various programs. The "REWIND" statement can be used in the job control language to rewind a dataset outside of a program. Datasets are "connected", positioned, and even assigned to particular Fortran unit numbers before an application is run. The same basic model holds true for VSOS on the Cyber 205 (and I suspect for some other systems too). Cray and Cyber experts please forgive me if I have messed up any details here. Does the Fortran standard say what the default position of a file is when it is OPENed? I think this is vendor-dependent. There are other models for handling files that differ from what Unix provides -- Fortran attempts to accomodate them. Karl Rowley Amdahl Corp. Santa Clara, California karl@uts.amdahl.com ...!ames!amdahl!karl