Guardian Programmer's Guide

Table Of Contents
Communicating With Magnetic Tape
Guardian Programmer’s Guide 421922-014
12 - 30
Writing to the Only File on a Labeled Tape Volume
2. Create a working set for the DEFINE using successive calls to the
DEFINESETATTR procedure. The working set should include the following:
The class of DEFINE (CLASS attribute). Set this value to “TAPE.”
The type of labels used (LABELS attribute). Set this value to “ANSI” or “IBM.”
The volume identifier (VOLUME attribute). Set this value to the value written to
the tape in the volume label.
The file identifier (FILEID attribute). If the file already exists, the file identifier
must be the same as the file identifier in the file label. If the file does not yet
exist, the file identifier can be any valid file identifier.
The file sequence number (FILESEQ attribute). This value must be set to 1 (or
not specified, as the default is 1) because it is the first file on the tape.
The I/O operation (USE attribute). This value must be set to “EXTEND” to
append records to the file or “OUT” to write a new file.
The conversion mode (EBCDIC attribute). Set this value to “OUT” to convert
ASCII code to EBCDIC on output. Use this option only if the tape uses IBM
standard labels.
The record type (RECFORM attribute). This value specifies fixed-length or
variable-length records.
The record length (RECLEN attribute). If you are appending to an existing file,
this value must be equal to the value written to the file label when the tape file
was created.
The record-block length (BLOCKLEN attribute). Set this value to either a
multiple of the fixed record length or the maximum variable record length. If
you are creating a new file, this value is placed in the tape label. If you are
appending to a file, this value must equal the corresponding value in the file
label on the tape.
The tape density (DENSITY attribute). This value must be the same as the
density of existing data on the tape.
3. Create the DEFINE using the DEFINEADD procedure.