Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Notes on stream-oriented I/O

&pagelevel(5)&pagelevel

Binary files (SAM)

Fixed record length (F) is the default. When a file is closed, the last record is padded with binary zeros (if necessary). If the same file is opened again and data is written at the end of the file, a new record is always started. In other words, the new data is written after the binary zeros.

If a variable record length is used (V or U), new data can be written on a byte-specific basis. The variable record length does, however, result in a loss of performance during seek operations (with fseek() and ftell() for example).

Binary files (PAM)

In order to permit byte-specific updating of PAM files (after a close and reopen), the C runtime system writes administrative data at the end of the file. This data is maintained in a consistent state at the time the file is opened and closed. Consequently, it is not possible for different tasks to process a PAM file concurrently if the file is extended by one of the tasks involved.
The C runtime system does not set any locks. If data is modified by several users, inconsistent states might result.

Text files (SAM, ISAM)

When SAM or ISAM files are processed in update mode, the original record length must not be changed when modifying existing records. This means that a newline character (\n) must not be changed to another character, or vice versa.