Guardian Programmer's Guide

Table Of Contents
Communicating With Magnetic Tape
Guardian Programmer’s Guide 421922-014
12 - 19
Buffered Mode for Streaming Devices (D-Series
Only)
The operation finishes when the synchronization is complete.
Buffered Mode for Streaming Devices (D-Series Only)
With streaming devices such as the 5120 cartridge tape, the device itself (or its integral
formatter) buffers requests in a way similar to buffered mode. The device replies to the
controller with a positive acknowledgment as soon as the data is transferred to the
device buffer, not when the data has been written to tape. Streaming implies file-level,
rather than record-level, recovery.
For devices such as the 5120 cartridge, buffered mode is enabled by default whenever
a device is placed into streaming mode by the following call:
LITERAL STREAMING^MODE = 119,
ENABLED = 1,
DISABLED = 0;
.
.
CALL SETMODE(TAPE^NUM,
STREAMING^MODE,
ENABLED);
For other streaming devices, such as the 5170, 5180 and 5190 drives, buffering must
be explicitly enabled using SETMODE function 99 as described for non-streaming
devices. For these devices, buffering is not automatic when streaming mode is
enabled using SETMODE function 119.
Buffering End-of-File Marks
Some tape devices, such as the 5170, allow end-of-file marks to be buffered. To
achieve EOF mark buffering, you use SETMODE function 99 with parameter-1 set
to 2:
LITERAL BUFFERED^MODE = 99,
ENABLE^BUFFERED^EOFMARKS = 2;
.
.
CALL SETMODE(TAPE^NUM,
BUFFERED^MODE,
ENABLE^BUFFERED^EOFMARKS);
An Example of Buffered-Mode Operation
Figure 12-3 shows an example of a buffered-mode write sequence. In this example,
the application sends four write requests and an EOF mark to the tape process. In this
case, three write requests are enough to fill the tape buffer. The application must
therefore wait for the fourth write request (Step 13) until one of the buffered write
operations is written to tape. Once the request to write an EOF mark is issued (Step
19), the tape process holds this request until all outstanding transfers to tape are
complete.