VMS Help
TCPIP Services, FTP, Copying Files, Preserving File Attributes
*Conan The Librarian (sorry for the slow response - running on an old VAX)
|
|
When you transfer OpenVMS files to a UNIX system and back again,
some record attributes might be lost. To preserve all RMS file
attributes, use the /FDL qualifier (File Definition Language)
with the GET and PUT commands.
You may also need to use the SET TYPE command to determine the
type of file transfer:
o Specifying SET TYPE ASCII results in a sequential file with
variable records. Select this type when transferring ASCII
text files.
o Specifying SET TYPE IMAGE results in a sequential file with
fixed records of 512 bytes. Select this type when transferring
non-ASCII files such as binary files or executable image
files.
For example, to transfer an executable image to a remote UNIX
host, follow these steps:
1. Specify the IMAGE data type:
FTP> SET TYPE IMAGE
2. Transfer the file to the remote host while at the same time
creating and transferring a secondary file with the file's
OpenVMS record attributes:
FTP> PUT/FDL file
To retrieve the file from the remote UNIX host, follow these
steps:
1. Specify the IMAGE data type:
FTP> SET TYPE IMAGE
2. Retrieve the file from the remote host after retrieving and
using the secondary file containing the file's OpenVMS record
attributes:
FTP> GET/FDL file.dat
1. In this example, the PUT/FDL command does the following:
o Creates the FDL file cygnet.bckfdl on the remote host with
the RMS attributes of file STAT.BCK.
o Transfers the data in STAT.BCK and puts it in to
cygnet.bckfdl on the remote host.
FTP> PUT/FDL STAT.BCK CYGNET.BCK
200 TYPE set to ASCII
200 PORT command successful
150 Opening data connection for cygnet.bckfdl (130.180.4.8,1028)
226 Transfer complete
local: cygnet.bckfdl remote: cygnet.bckfdl
846 bytes sent in 00:00:00.03 seconds
200 TYPE set to IMAGE
200 PORT command successful
150 Opening data connection for cygnet.bck (130.180.4.8,1029)
226 Transfer complete
local: STAT.BCK remote: cygnet.bck
8152 bytes sent in 00:00:00.12 seconds
FTP>
In this final example, the GET/FDL command does the following:
o Transfers the FDL file cygnet.bckfdl from the remote host
to the local host.
o Uses this file to re-create the file STAT.BCK, with all of
its original RMS attributes, on the local host.
o Transfers the data in cygnet.bck and puts it in to the new
local file STAT.BCK.
FTP> GET/FDL CYGNET.BCK STAT.BCK
200 TYPE set to ASCII
200 PORT command successful
150 Opening data connection for cygnet.bckfdl (130.180.4.8,1028)
226 Transfer complete
local: cygnet.bckfdl remote: cygnet.bckfdl
846 bytes sent in 00:00:00.03 seconds
200 TYPE set to IMAGE
200 PORT command successful
150 Opening data connection for cygnet.bck (130.180.4.8,1029)
226 Transfer complete
local: STAT.BCK remote: cygnet.bck
8152 bytes sent in 00:00:00.12 seconds
FTP>
[legal]
[privacy]
[GNU]
[policy]
[netiquette]
[sponsors]
[FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.