Guardian Programmer's Guide

Table Of Contents
Communicating With Magnetic Tape
Guardian Programmer’s Guide 421922-014
12 - 16
Working in Buffered Mode
Working in Buffered Mode
We recommend using buffered mode to improve the performance of tape read and
write operations.
In buffered mode, the tape process, which is a system process, replies to write
requests as soon as the data has been transferred from the application to the tape
process buffer. The application can then continue while the data from the previous
request is written to tape. When buffering, the request that returns the error is not
executed.
If the application continues to issue write requests only, the tape process accepts the
requests until the buffer is full. When the buffer is full, the tape process holds further
requests until previous requests finish.
The application cannot determine which of its previous write requests have been
written to tape. If an error occurs in one of the previous write requests, an error
condition is returned to the application but the application cannot determine which
request failed.
Usually, the tape process does not process requests other than write requests until all
previous write requests have been completed. For example, if the application program
issues a CONTROL request against the tape file, the tape process holds the request
and the application waits until all outstanding writes have finished successfully.
Successful completion of a non-write request means that all records have been written
to tape without error.
Some tape devices, such as the 5170, do support buffered end-of-file marks. This
feature must be specifically enabled using SETMODE function 99 as described below.
If the application closes the tape device before the previous write requests have
finished, the tape process performs the outstanding requests before the close request
is finished. However, because the FILE_CLOSE_ procedure does not return regular
Figure 12-2. Physical Tape Records Containing Records of Fixed Length
VST061.VSD
VST061.VSD