| Application Programmer's I/O Guide - S-3695-35 | ||
|---|---|---|
| Prev Section | Chapter 7. File Structures | Next Section |
The tape or bmx file structure is used for online tape access through the UNICOS tape subsystem. You can use any type of sequential, formatted, unformatted, or buffer I/O to read or write an online tape if this file structure was specified.
Each read or write request results in the processing of one tape block.
This file structure is the default option for doing any type of Fortran I/O to an online tape file. The file structure can be specified with one of the following commands:
assign -s bmx assign -s tape assign -F bmx assign -F tape |
These assign(1) commands result in the same file structure. Each read or write request results in the processing of one tape block. This structure can be used only with online IBM-compatible tape files or with ER90 volumes mounted in blocked mode. See the Tape Subsystem User's Guide for more information on library interfaces to ER90 volumes.
When using Fortran I/O or FFIO for online tapes and the tape or bmx file structure, all of the user's data passes through a library buffer. The size and number of buffers can affect performance. Each of the library's buffers must be a multiple of the maximum block size (MBS) on the tape, as specified by the tpmnt -b command.
On IOS model D systems, one tape buffer is allocated by default. The buffer size is either MBS or (MBS × n), whichever is larger (n is the largest integer such that MBS × n ≤ 65536).
On IOS model E systems, the default is to allocate 2 buffers of 4 × MBS each, with a minimum of 65,536 bytes, provided that the total buffer size does not exceed a threshold defined within the library. If the MBS is too large to accommodate this formula, the size of the buffers is adjusted downward, and the number is adjusted downward to remain under the threshold.
In all cases, at least one buffer of at least the MBS in bytes is allocated.
During a write request, the library copies the user's data to its buffer. Each of the user's records must be placed on a 4096-byte boundary within the library buffer. After a user's record is copied to the library buffer, the library checks the remaining free buffer space. If it is less than the maximum block size specified with the tpmnt -b command, the library issues an asynchronous write (writea(2)) system call. If the user requests that a tape mark be written, this also causes the library to issue a writea system call.
When using Fortran I/O or FFIO to read online tapes, the system determines how much data can be placed in the user's buffers. Reading a user's tape mark stops all outstanding asynchronous I/O to that file.
| Prev Section | Table of Contents | Title Page | Next Section |
| COS or blocked file structure | Up one level | Buffering |