Technical data

Using Files and Directories
10.7 Accessing Tape Files
c. Writes the trailer labels
d. Writes two tape marks to denote the logical end-of-volume (EOV)
All files following the newly created file are lost.
To close a tape file that was opened for write access, the tape file system issues
commands to the driver to write the labels, followed by a double tape mark that
indicates the logical EOV.
10.7.5.2 Appending or Updating Files
When you use DCL to access an existing file for a write operation, either an
append or an update operation is actually performed. The following table
describes each operation.
Access
Method Description
Append When you access a file for an append operation, the tape is positioned
before the tape mark that precedes the trailer labels. After the file is
appended and closed, all files beyond the appended file are lost. When the
positioning is complete, the processing is handled as if the file had been
created.
Update When you access a file for an update operation, the tape is positioned after
the tape mark that follows the header labels. After the file is written to
and closed, all files beyond the updated file are lost. The processing is
handled as if the file had been created.
Note that you can update or append tape files only when the header label contains
a value of 0 for the buffer offset length. For more information about how to
update and append tape files, see Section 10.8.
If you do not specify the /OVERRIDE=EXPIRATION qualifier when you update
a file, the tape file system checks the expiration date field on the file before it
allows you to write to that file.
In addition, before you append a file, the tape file system checks the expiration
dates of both the file being appended and the file immediately following it. If the
expiration date of either file has not been reached, the magnetic tape file system
does not allow you to append the file.
Example
You can use the CREATE command to access a volume for a write operation. The
following CREATE command writes a new file to the tape volume:
$ CREATE MTA0:MYFILE
After entering a command similar to the one in this example, follow these steps:
1. Enter the contents of the file.
2. Press Ctrl/Z to close the file and write it to the tape volume without leaving
the DCL command level.
Using Files and Directories 1027