HP 3000 Manuals

Using Magnetic Tapes [ HP FORTRAN 77/iX Programmer's Guide ] MPE/iX 5.0 Documentation


HP FORTRAN 77/iX Programmer's Guide

Using Magnetic Tapes 

Magnetic tapes can be directly read or written from FORTRAN 77 programs
by a FILE equation.  As a MIL-SPEC 1753 extension to the ANSI standard,
such tapes can be read or written in multiple logical files on the same
tape.  The most portable format is a fixed record length ASCII file with
a specified blocking factor of one.  However, the blocking factor of one
wastes tape because the interrecord gaps are longer on the tape than on a
single formatted record of normal length.  For example, the equation

     :FILE OUTFILE; DEV=TAPE; REC=-80,10,F,ASCII

with the FORTRAN 77 statements

     OPEN(16,FILE='OUTFILE')

     DO i = 1,400
        WRITE(16,*) " This will be written on a tape 400 times."
     ENDDO

causes a tape file to be created with ASCII logical records 80 bytes long
in blocks of 10 logical records per physical record.

FORTRAN/3000 programs that use the UNITCONTROL intrinsic are supported by
HP FORTRAN 77/iX. All the options of the FORTRAN/3000 version are
supported on HP FORTRAN 77/iX, including those operations commonly used
for magnetic tape handling.



MPE/iX 5.0 Documentation