Technical data
Using Files and Directories
10.8 Copying and Transferring Files
10.8.2 Copying Files to Tape Volumes
You can use the COPY command to copy files from a disk volume to a tape
volume. The procedures are similar to those for copying files from one disk
volume to another. One difference, however, is that magnetic tapes are
sequential-access devices and do not have directories. You must set up (initialize
and mount) a tape device before copying disk files to a tape volume. (The
characteristics of tape files are described in Section 10.7.)
The entire set of Files–11 file names is supported for magnetic tapes. You can
copy a disk file with the following file name to a magnetic tape volume without
having to modify the file name:
THIS_IS$AN_OPENVMSLONG_FILE.LONG_TYPE
Note
Most systems that are not OpenVMS do not use file names longer than 17
characters.
Although the OpenVMS system supports stream and variable with fixed-length
control (VFC) records, it encodes these records in a variable-length format on
standard-labeled volumes. Systems that are not OpenVMS do not distinguish
stream records or VFC records from variable-length records; instead, they
interpret both as variable-length records. Therefore, do not create either stream
or VFC records on volumes that will be used for information interchange to a
system that is not OpenVMS.
The following steps show how to use DCL commands to copy files from a default
directory on a disk volume to a standard-labeled magnetic tape volume. Included
in the steps are examples showing how to allocate, initialize, and use a magnetic
tape to copy a set of your disk files.
How to Perform This Task
To copy files from a default directory on a disk volume to a standard-labeled tape
volume, follow these steps:
1. First, allocate a drive as follows:
$ ALLOCATE MT: TAPE_DEVICE
%DCL-I-ALLOC _MARS$MTA2: allocated
This ALLOCATE command requests the allocation of a tape drive whose
name begins with MT. The logical name TAPE_DEVICE in this case refers to
the MARS$MTA2: drive.
The system response indicates that unit 2 on controller A was available and
is now allocated to you. You can now physically load the tape on the drive.
Be sure the write ring on the tape is in place; if it is not, you cannot write to
the tape.
2. Initialize the tape by entering a command similar to the following:
$ INITIALIZE TAPE_DEVICE: GMB001/PROTECTION=(GROUP:R,WORLD)
The INITIALIZE command specifies the logical name for the volume (TAPE_
DEVICE, which in this case refers to MTA2:) and the volume label for the
tape volume (GMB001). The label can be no longer than six characters. The
/PROTECTION qualifier defines a protection code restricting group access to
read and allowing no world access.
Using Files and Directories 10–31










