The FORTRAN Open Statement
The FORTRAN open statements under VS FORTRAN and UNIX
FORTRAN are the same except for some minor variations. The
parameters "unit", "err", "status" and "iostat" function
identically in both systems. The "file" parameter under VS
FORTRAN can be set to a ddname or a filename whereas under
UNIX FORTRAN, it can only be set to a filename. However,
one can use a symbolic link to simulate using a ddname.
Under VS FORTRAN and UNIX the "access" parameter can be set
to sequential and direct. Under UNIX FORTRAN, access can
also be set to "append". The parameter "blank" works exactly
the same under both VS FORTRAN and UNIX FORTRAN with one
exception. Under VS FORTRAN, when an open statement is
used, the default value for blank is null whereas if an open
statement is not used, the default is zero. Under UNIX
FORTRAN, whether an open statement is used or not the default
is always null. The "form" parameter is the same under both
systems, but under UNIX FORTRAN there is the additional value
"print" which causes a printer file to be created for an output
file (See the tip sheet, "FORTRAN Carriage Control", for more
information on print files). The parameter "recl" is set to
the number of characters in a direct access record under both
systems. However, under UNIX FORTRAN if the option "-xld" is
used (e.g., for debugging), then recl's value is the number
of words so that the number of characters in a record in this
case is equal to the recl value times 4 for single precision
and times 8 for double precision.
*****************************************************************
* *
* Correspondence to VS FORTRAN *
* ============================ *
* *
*****************************************************************
* *
* VS FORTRAN UNIX *
* ========== ==== *
* *
* *
* Unit Number *
* =========== *
* *
* open(unit=3,..... open(unit=3,..... *
* *
* or or *
* *
* open(3,..... open(3,..... *
* *
* *
* Err *
* === *
* *
* open(....,err=99,.. open(....,err=99,.. *
* *
* *
* Status *
* ====== *
* *
* open(....,status='new',... open(....,status='new',... *
* *
* *
* Iostat *
* ====== *
* *
* open(....,iostat=ios,... open(....,iostat=ios,... *
* *
* *
* File *
* ==== *
* *
* open(9,file='/out file a',.. open(9,file='out.file',.. *
* *
* open(9,file='ddname',... open(9,file='ddname',..... *
* *
* plus CMS command plus shell command *
* *
* filedef ddname disk out file a ln -s out.file ddname *
* *
* *
* Access *
* ====== *
* *
* open(....,access='direct',.. open(..,access='direct',.. *
* *
* filedef 9 disk out file a (disp mod open(9,access='append', *
* file='out.file') *
* *
* Blank *
* ===== *
* *
* open(....,blank='null',... open(....,blank='null',... *
* *
* If an open statement for Whether an open statement *
* a given unit is not issued, for a given unit is issued *
* the default for blank is zero; or not the default for *
* if an open statement is issued, blank is null. *
* the default for blank is null. *
* *
* *
* Form *
* ==== *
* *
* open(....,form='unformatted', open(....,form='unformatted', *
* *
* VS FORTRAN recognizes carriage UNIX FORTRAN does not recog- *
* control characters by default. nize carriage control char- *
* acters by default. Carr- *
* iage control can be implemen- *
* ted by making the output file *
* a print file: *
* *
* open(....,form='print',... *
* *
* Recl *
* ==== *
* *
* open(..,access='direct', open(..,access='direct', *
* recl=70,... recl=70,... *
* *
* recl = the number of recl = the number of *
* bytes/record bytes/record unless the *
* compiler option, -xld is *
* used in which case recl is *
* the number of words/record *
* *
*****************************************************************

June 19, 1994