next up previous contents index
Next: Unformatted Direct-access Files Up: External Files Previous: Formatted Sequential Files

Unformatted Sequential Files

Unformatted sequential files are often used as to transfer data from one program to another. They are also suitable for scratch files, i.e. those used temporarily during program execution. The only limit on the length of unformatted records is that set by the operating system; most systems allow records to contain a few thousand data items at least. The OPEN statement must specify the file format, but the default access method is ``sequential". Each READ or WRITE statement transfers one unformatted record.

For example, these statements open an existing unformatted file and read two records from it:

 
      OPEN(UNIT=15, FILE='BIN', STATUS='OLD', FORM='UNFORMATTED') 
      READ(15) HEIGHT, LENGTH, WIDTH 
      READ(15) ARRAYP, ARRAYQ
BACKSPACE and REWIND statements may generally be used on all unformatted sequential files.



Mario Storti
Wed Nov 4 19:32:56 ART 1998