Record/Byte Files

A record file (also called "block file") is organized into records. Data is read and written to record files one record at a time. You cannot write to the middle of a record. An INDEXED file is an example of a record file.

A byte file (also called "character file") is not logically divided into records. Data is read and written to a byte file in arbitrary lengths. A STRING file is an example of a byte file.

Finite/Infinite Files

  • A finite file has a beginning and an end. The same data may be read and reread any number of times. Any disk file is a finite file. A magnetic tape device is also a finite file.

  • An infinite file is a continuous stream of data. You cannot go back and reread or rewrite data to an infinite file. Neither can you skip forward in an infinite file. Keyboards and printers are examples of infinite files. Sometimes a logical end-of-file condition may be defined by a special character but the physical property of an infinite file has no defined end.