Path: utzoo!attcan!uunet!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!harriett!hirchert From: hirchert@harriett.ncsa.uiuc.edu (Kurt Hirchert) Newsgroups: comp.lang.fortran Subject: Re: File handling in Fortran 77 Message-ID: <1990Oct1.174040.16208@ux1.cso.uiuc.edu> Date: 1 Oct 90 17:40:40 GMT References: <46016@masscomp.ccur.com> <1990Sep12.215551.16135@agate.berkeley.edu> <271@cadlab.sublink.ORG> <2144@key.COM> Sender: news@ux1.cso.uiuc.edu (News) Reply-To: hirchert@harriett.ncsa.uiuc.edu (Kurt Hirchert) Organization: National Center for Supercomputing Applications Lines: 32 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. Steve's description of POSITION='ASIS' is not entire correct. ASIS provides processor-dependent positioning. I.e., it provides what FORTRAN 77 provided (although the FORTRAN 77 standard was not as explicit about this). What might this mean? o In the simplest case, ASIS might mean the same as APPEND (as in the original f77 implementation of FORTRAN 77) or REWIND (as is the default on most systems not based on f77). o ASIS might mean APPEND or REWIND based on some external system information. For example, users of OS/360 and its successors could use JCL to choose between adding to the end of an existing file (DISP=MOD) and overwriting an existing file (DISP=OLD). ASIS could be interpreted as taking the positioning from the DISP field of the JCL. o ASIS might mean the current physical positioning of a device such as a magnetic tape drive. o ASIS might mean a position retained by the Fortran I/O library for the duration of the execution of a Fortran program. (I think this is what Steve was describing.) o ASIS might mean a position retained by the I/O library or the system for a period of time longer than the execution of a single program. In other words, POSITION='ASIS' allows the Fortran processor to provide access to whatever extended positioning capabilities a system may provide, but the existence of POSITION='ASIS' should not be construed as a requirement that such extended positioning capabilities must be provided. -- Kurt W. Hirchert hirchert@ncsa.uiuc.edu National Center for Supercomputing Applications