HPlogo HP ARPA File Transfer Protocol User's Guide > Appendix A MPE/iX and POSIX Differences

Transferring Files

MPE documents

Complete PDF
Table of Contents
Index
Glossary

E0300 Edition 6 ♥
E1098 Edition 5

File names are taken as they are presented, as opposed to the directory commands described in previous sections (directory commands which preface (./) to the file name). Directory commands are always dealing with POSIX files, so prefacing a (./) is helpful to the user. When transferring files, files prefaced with a (.) or (/) will reference a file in the POSIX name-space as opposed to the MPE/iX name-space.


NOTE: If the path specified for the source file does not exist on the target system, the target file must be specified in the FTP/iX file transfer command. If the target file is not specified, FTP/iX will attempt to create the file with the path specified. If the target file is to be copied to the current working directory, only the filename (not the full path) needs to be specified.

Example 1:

This example demonstrates a FTP data transfer from a file in a MPE group to a POSIX directory.

  :listf testdata,2
  ACCOUNT=  SYS         GROUP=  WORK

  FILENAME  CODE  ------------LOGICAL RECORD-----------  ----SPACE----
                    SIZE  TYP        EOF      LIMIT R/B  SECTORS #X MX

  TESTDATA           80B  FA       13820      13820  16     4304  1  *


  ftp> pwd
  257-"/SYS/WORK" is the current directory.
  257 ",MANAGER.SYS,WORK" is the current session.

  ftp> mkdir temp
  257 MKD successful, "temp" created.

  ftp> cd temp
  250 CWD file action successful.

  ftp> pwd
  257-"/SYS/WORK/temp" is the current directory.
  257 ",MANAGER.SYS,WORK" is the current session.

  ftp> put testdata
  200 PORT command ok.
  150 File: testdata;REC=-80,16,F,ASCII;DISC=13820,8 opened;
    data connection will be opened
  226 Transfer complete.
  1133496 bytes sent in 1.25 seconds (885.54 Kbytes/sec)

  ftp> dir
  200 PORT command ok.
  150 File: LISTFILE ./@,2 opened; data connection will be opened

  PATH= /SYS/PUB/

  CODE  ------------LOGICAL RECORD-----------  ----SPACE----  FILENAME
          SIZE  TYP        EOF      LIMIT R/B  SECTORS #X MX

           80B  BA       13820      13820  16     4320 17  8  TESTDATA

  226 Transfer complete.
  235 bytes received in 0.02 seconds (14.34 Kbytes/sec)

Example 2:

This example demonstrates a FTP data transfer from a file in a POSIX directory to a POSIX directory. The sample file copied in the prior example will be copied back to the local system in the POSIX directory /SYS/WORK/temp2.

  ftp> :newdir /SYS/WORK/temp2
  Created directory "/SYS/WORK/temp2"

  ftp> :chdir /SYS/WORK/temp2
  CWD is "/SYS/WORK/temp2".

  ftp> :showvar HPCWD
  HPCWD = /SYS/WORK/temp2

  ftp> :SHOWME
  USER: #S6,MANAGER.SYS,PUB           (IN PROGRAM)

  ftp> PWD
  257-"/SYS/WORK/temp" is the current directory.
  257 ",MANAGER.SYS,WORK" is the current session.

  ftp> DIR
  200 PORT command ok.
  150 File: LISTFILE ./@,2 opened; data connection will be opened

  PATH= /SYS/WORK/temp/

  CODE  ------------LOGICAL RECORD-----------  ----SPACE----  FILENAME
          SIZE  TYP        EOF      LIMIT R/B  SECTORS #X MX

           80B  FA       13820      13820  16     4320 17  8  TESTDATA

  226 Transfer complete.
  235 bytes received in 0.02 seconds (12.75 Kbytes/sec)

  ftp> get testdata
  200 PORT command ok.
  150 File: testdata opened; data connection will be opened
  226 Transfer complete.
  1133496 bytes received in 2.19 seconds (504.30 Kbytes/sec)
  ftp> :listfile,2

  PATH= /SYS/WORK/temp2/

  CODE  ------------LOGICAL RECORD-----------  ----SPACE----  FILENAME
          SIZE  TYP        EOF      LIMIT R/B  SECTORS #X MX

           80B  FA       13820      13820  16     4320 17  8  TESTDATA

Example 3:

This example demonstrates a FTP data transfer utilizing POSIX name space.

  :listf testdata,2
  ACCOUNT=  SYS         GROUP=  WORK

  FILENAME  CODE  ------------LOGICAL RECORD-----------  ----SPACE----
                    SIZE  TYP        EOF      LIMIT R/B  SECTORS #X MX

  TESTDATA           80B  FA       13820      13820  16     4304  1  *


  ftp> pwd
  257-"/SYS/WORK" is the current directory.
  257 ",MANAGER.SYS,WORK" is the current session.

  ftp> put TESTDATA /SYS/WORK/temp/long_file_name
  200 PORT command ok.
  150 File: /SYS/WORK/temp/long_file_name;REC=-80,16,F,ASCII;DISC=13820,8
    opened:
  data connection will be opened
  226 Transfer complete.
  1133496 bytes sent in 1.29 seconds (858.09 Kbytes/sec)

When specifying files in the POSIX file space, you must specify the file in POSIX syntax or else FTP will attempt to fit the file in the MPE file space and fail, as in the following examples:

Example 4:


  ftp> put TESTDATA long_file_name2
  200 PORT command ok.
  550 An invalid character was found in an MPE syntax name.
    (FILE SYSTEM ERROR -102)
  Data Transfer Request Failed. (FTPERR 13)

Example 5:


  ftp> put TESTDATA longfilename12
  200 PORT command ok.
  500 The file name specified exceeds the maximum legal length.
    (FILE SYSTEM ERROR -110)
  Data Transfer Request Failed. (FTPERR 13)




FTP Default Name Space


Appendix B Error Messages