Guardian Programmer's Guide

Table Of Contents
Communicating With Magnetic Tape
Guardian Programmer’s Guide 421922-014
12 - 74
Writing to a Single-File Unlabeled Tape
Similarly, you can convert ASCII code to EBCDIC for output as follows:
FUP COPY $TAPE1,$TAPE2,EBCDICOUT
Refer to the File Utility Program (FUP) Reference Manual for details on the FUP
COPY command.
Setting Buffered Mode
As with labeled tape, we recommend using buffered mode to increase throughput.
When you use buffered mode for writing to a tape, the application is allowed to
continue as soon as the tape process has received the write request. Without buffered
mode, the application must wait for each write to tape to finish before continuing.
When reading from tape in buffered mode, the tape process reads ahead in
anticipation of sequential read operations.
You turn on buffered mode using SETMODE function 99:
LITERAL BUFFERED^MODE = 99,
ON = 1,
OFF = 0;
.
.
CALL SETMODE(TAPE^NUM,
BUFFERED^MODE,
ON);
IF <> THEN ...
Always turn off buffered mode before closing the tape drive and unloading the tape:
CALL SETMODE(TAPE^NUM,
BUFFERED^MODE,
OFF);
IF <> THEN ...
For complete details on buffered mode operation, refer to Working in Buffered Mode,
earlier in this section.
Writing to a Single-File Unlabeled Tape
The following paragraphs describe how to write programs to do the following:
Write a new file to a scratch tape.
Append to the only file on an unlabeled tape.