14.4 I/O and Record Buffers
An I/O buffer is a storage area in your program that RMS
uses to store data for I/O operations. You do not have direct
access to I/O buffers; they are controlled entirely by RMS.
The I/O buffer holds blocks of data transferred from the de-
vice, and its size is always greater than or equal to that of
the record buffer. For more information about the amount
of storage allocated for I/O buffers, see the OpenVMS Record
Management Services Reference Manual .
A record buffer is another storage area in your program.
You have direct access to and control of the record buffer.
When your program reads a record from a file, the informa-
tion is transferred from the file to the I/O buffer in one large
chunk of data, and then the requested record is transferred
to the record buffer. When your program writes a record,
data is transferred from the record buffer to the I/O buffer,
and then to the file either when the I/O buffer is full or when
other blocks need to be read in.
You can use MAP statements to create static record
buffers and associate program variables with areas (fields)
of the buffer. Static record buffers are buffers whose size does
not change during program execution and whose program
variables are always associated with the same fields in the
buffer.
You can create dynamic record buffers with either a MAP
DYNAMIC or a REMAP statement. These statements, when
used after a MAP statement, associate or reassociate a par-
ticular program variable with a different area (field) of the
record buffer. However, the total size of a record buffer does
not change during program execution.