VMS Help
TCPIP Services, FTP, Copying Files

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

    To copy files from a remote host to your local host, use the GET
    command. To copy files from your local host to a remote host,
    use the PUT command. To use these commands, you must have an
    active FTP session with a remote host. You can enter any number
    of commands during the session. You can also use the COPY/FTP
    command to copy files across the network using TCP/IP. For
    more information on this command, type HELP COPY/FTP at the DCL
    prompt.

    FTP resolves the differences between UNIX file systems and
    OpenVMS file systems automatically. By default, the PUT command
    copies files to UNIX systems using lowercase file names without
    version numbers. If you use a wildcard to copy all versions of a
    file and do not specify an output file:

    -  The version numbers become the last element of the copied
       files.

    -  Semicolons are converted to periods.

  1 - VMS Plus Mode

    FTP performs fast file transfers between two OpenVMS systems (VMS
    Plus Mode).

    When FTP identifies file transfers between two OpenVMS hosts
    running DIGITAL TCP/IP Services for OpenVMS, it transfers files
    in large blocks, rather than small records. VMS Plus Mode greatly
    increases the transfer speed and preserves all Record Management
    Services (RMS) file attributes.

    FTP automatically disables VMS Plus Mode when your session is
    with a UNIX host or another OpenVMS host not running DIGITAL
    TCP/IP Services for OpenVMS.

  2 - Preserving File Attributes

    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

 2.1 - Examples

    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>

  3 - Transfer Mode

    DIGITAL TCP/IP Services for OpenVMS supports only STREAM mode
    for data transfer. STREAM mode transmits the data as a stream of
    bytes.

  4 - File Structure

    DIGITAL TCP/IP Services for OpenVMS supports transfers of ASCII
    (stream, records with variable length) and IMAGE (binary, records
    fixed at 512 bytes) files. A file is a continuous sequence of
    data bytes.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.