next up previous contents index
Next: NFS access Up: Alternatives and recommendations Previous: Alternatives and recommendations

ftp transfer

Unformatted files in exchange mode can be transferred using binary ftp between different machines without problems except:

  1. On VMS systems, one cannot currently specify the format of the target file. The file can be converted on the VMS end using the RESIZE command, which invokes the following command file:

    CERNLIB RESIZE command

    $!***************************************************************
    $!*                                                             *
    $!* RESIZE.COM v1.02                                            *
    $!*                                                             *
    $!* Resize ftp-files                                            *
    $!* Author: J.Zoll 90/07/24                                     *
    $!*                                                             *
    $!* Mods       Date   Comments                                  *
    $!* MARQUINA 92/12/07 Add cosmetics for public release          *
    $!* M.Kelsey 93/10/01 Prevent clashes on simultaneous runs      *
    $!*                                                             *
    $!***************************************************************
    $ ver_proc=F$VERIFY(0)
    $ SAY   :== WRITE/SYMBOL SYS$OUTPUT
    $ If p1.eqs.""
    $ Then Say "%DCL-I-SYNT syntax: resize [-s size] input_file [output_file]"
    $      Exit
    $ Endif
    $ On ERROR     Then Goto EXIT
    $ On CONTROL_Y Then Goto EXIT
    $!
    $      ifile=p1
    $      ofile=p2
    $      size =3600
    $ If p1.eqs."-S"
    $ Then ifile=p3
    $      ofile=p4
    $      size =p2
    $ Endif
    $ If ofile.eqs."".or.ofile.eqs."-" Then ofile=ifile
    $
    $ ffile="EXCH_"+F$GETJPI("","PID")+".DAT"
    $ OPEN/WRITE OUTP 'ffile
    $ WRITE OUTP    "RECORD"
    $ WRITE OUTP    "BLOCK_SPAN              yes"
    $ WRITE OUTP    "CARRIAGE_CONTROL        none"
    $ WRITE OUTP    "FORMAT                  fixed"
    $ WRITE OUTP    "SIZE                    ''size'"
    $ CLOSE OUTP
    $
    $ Say "resize: setting record size of ",ofile," to ",size," bytes..."
    $ EXCHANGE/NETWORK 'ifile 'ofile -
            /TRANSFER=BLOCK -
            /FDL='ffile
    $!
    $ purge/nolog 'ofile'
    $ EXIT:
    $ DELETE/NOCONF/NOLOG 'ffile'.*
    $ dummy=F$VERIFY(ver_proc)
    $ Exit
    
  2.   With version 3.3 (February, 1994) of TGV Multinet TCP/IP software for OpenVMS, it is possible to set the record size for binary transfers in FTP (previously the only allowed sizes were 512 and 2048 bytes). The commands are RECORD-SIZE nnnnn when the ftp session originates on the openVMS computer, and QUOTE SITE RMS RECSIZE nnnnn when ftp is started from the non-VMS end. Here are examples of the two cases.

    For a transfer starting on an OpenVMS computer

    $ FTP SHIFT.CERN.CH
    SHIFT.CERN.CH> USER yourname
    <Password required for yourname.
    Password:
    <User leeiv logged in.
    SHIFT.CERN.CH> VERSION
    DUKPHY.PHY.DUKE.EDU MultiNet FTP user process 3.3(109)
    SHIFT.CERN.CH> BINARY
    Type: Image, Structure: File, Mode: Stream
    SHIFT.CERN.CH> RECORD-SIZE 32400
    SHIFT.CERN.CH> RECORD-SIZE
    Record size for IMAGE files: 32400
    SHIFT.CERN.CH> GET myfile.rzhist myfile.rzhist
    SHIFT.CERN.CH> QUIT
    $
    

    For a transfer starting from a non-Multinet computer

    > ftp dukphy.phy.duke.edu
    Connected to dukphy.phy.duke.edu.
    220 DUKPHY.PHY.DUKE.EDU MultiNet FTP Server Process 3.3(14) at Mon 13-Jun-94
    Name: yourname
    331 User name (yourname) ok. Password, please.
    Password:
    ftp> binary
    200 Type I ok.
    ftp> quote site rms recsize 32400
    200 IMAGE file record size now 32400 bytes
    ftp> put myfile.rzhist myfile.rzhist
    ftp> quit
    

  3. On Unix systems, ZEBRA FZ files should be read and written with C I/O (option L in call to FZFILE.
  4. On VM/CMS systems, one can specify the record format of the target file using an ftp subcommand such as the following:

    bin f 3600
    

    If connecting to a VM/CMS system, then use

    bin
    
    quote site fix 3600
    


Janne Saarela
Tue May 16 09:22:05 METDST 1995