Technical data
Using Files and Directories
10.8 Copying and Transferring Files
For this example, assume that the disk device DMA5: has been allocated to
your process and that a disk volume has been initialized and mounted on
that device. Also assume that you have a directory called PRIVATE already
created on that volume.
3.
$ COPY/LOG MTA1:"%&*?!SKI! """ SEASON.DAT
%COPY-S-COPIED, MTA1:[]"%&*?!SKI! """.;1
copied to WRKD:[MANUAL]SEASON.DAT;1 (120 records)
The COPY/LOG command in this example copies the tape file %&*?!SKI!#"
(# means space) to the file SEASON.DAT on the default disk and directory,
WRKD:[MANUAL]. To copy the file to disk, you must specify a new file
name. (The OpenVMS software provides defaults for segments of the file
specification that are not specified.)
Because this example uses the /LOG qualifier, the system returns a message
that confirms the file was copied from the MTA1: tape volume; the message
also tells how many records were copied.
4.
$ COPY/LOG MTA0:*.* *
%COPY-S-COPIED, MTA0:[]TASTETEST.DAT;1
copied to WRKD:[FOOD]TASTETEST.DAT;1 (249 records)
%COPY-S-COPIED, MTA0:[]ALLAT;1 copied to WRKD:[FOOD]ALALL;1 (48 records)
%COPY-S-NEWFILES, 2 files created
In this example, the COPY/LOG command specifies wildcard characters for
the file name and file type. Therefore, the system copies the only two files on
the tape volume to the disk volume.
5.
$ COPY/LOG MTA1:*.* [EX]
%COPY-S-COPIED, MTA1:[].DAT;1 copied to WRKD:[EX]TEST.DAT21 records
%COPY-E-OPENOUT, error opening WRKD:[EX]"%&*()!SKI! """.;1 as output
-RMS-F-FNM, error in file name
%COPY-W-NOTCOPIED, MTA1:[]"%&*()!SKI! """.;1 not copied
%COPY-E-OPENOUT, error opening WRKD:[EX]"SANFRAN%%%""".;1 as output
-RMS-F-FNM, error in file name
%COPY-W-NOTCOPIED, MTA1:[]"SANFRAN%%%""".;1 not copied
%COPY-S-COPIED, MTA1:[]OPENVMS_LONG$FILE_NAME.LONG_EXT;1
copied to WRKD$:[EX]OPENVMS_LONG$FILE_NAME.LONG_EXT;1 (80 records)
%COPY-S-COPIED, MTA1:[]C6.JOU;1 copied to WRKD:[EX]C6.JOU;1 (4 records)
%COPY-S-NEWFILES, 2 files created
The COPY/LOG command string specifies that all files on the volume
mounted on tape volume MTA1: are to be copied to the current default
disk and directory WRKD:[EX]. However, the system does not copy files with
tape file names, but, instead, returns an error message.
6.
$ COPY/FTP sys$login:login.com - $_ system.bldg.corp.com"username
password"::sys$login:login.tmp
This example transfers the OpenVMS RMS file SYS$LOGIN:LOGIN.COM
to the remote file SYS$LOGIN:LOGIN.TMP over a TCP/IP connection while
specifying the user name and password on the remote system.
10–30 Using Files and Directories










