HP 3000 Manuals

Transferring Files [ HP ARPA File Transfer Protocol User's Guide ] MPE/iX 5.0 Express III Documentation


HP ARPA File Transfer Protocol User's Guide

Transferring Files 

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. Table A-17. ----------------------------------------------------------------------------------------------- | | | :listf testdata,2 | | | ----------------------------------------------------------------------------------------------- | | | | | | | ACCOUNT = | SYS | GROUP= WORK --------LOGICAL RECORD | -----SPACE ----- | | | FILENAME | CODE | -------- | | | | | | | | | ----------------------------------------------------------------------------------------------- | | | | | | | | | | | | | TESTDATA | SIZE | TYP FA | EOF 13820 | LIMIT | R/B 16 | | SECTORS | #X 1 | MX * | | | | 80B | | | 13820 | | | 4320 | | | | | | | | | | | | | | | | ----------------------------------------------------------------------------------------------- Table A-18. -------------------------------------------------------------------------------------------------- | | | 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/WORK/temp/ CODE | ----- SPACE ----- | FILENAME | | | ------------LOGICAL RECORD ------------ | | | | | | | | -------------------------------------------------------------------------------------------------- | | | | | | | | | | | | | | | SIZE | TYP FA | EOF | LIMIT | R/B 16 | SECTORS | #X | MX 8 | TESTDATA | | | | 80B | | 13820 | 13820 | | 4320 | 17 | | | | | | | | | | | | | | | -------------------------------------------------------------------------------------------------- | | | 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. Table A-19. -------------------------------------------------------------------------------------------------- | | | 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: | (IN PROGRAM) | | #S6,MANAGER.SYS,PUB | | | | | -------------------------------------------------------------------------------------------------- | | | 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 | ----- SPACE ----- | FILENAME | | | ------------LOGICAL RECORD ------------ | | | | | | | | -------------------------------------------------------------------------------------------------- | | | | | | | | | | | | | | | SIZE | TYP FA | EOF | LIMIT | R/B 16 | SECTORS | #X | MX 8 | TESTDATA | | | | 80B | | 13820 | 13820 | | 4320 | 17 | | | | | | | | | | | | | | | -------------------------------------------------------------------------------------------------- | | | 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 | ----- SPACE ----- | FILENAME | | | ------------LOGICAL RECORD ------------ | | | | | | | | -------------------------------------------------------------------------------------------------- | | | | | | | | | | | | | | | SIZE | TYP FA | EOF | LIMIT | R/B 16 | SECTORS | #X | MX 8 | TESTDATA | | | | 80B | | 13820 | 13820 | | 4320 | 17 | | | | | | | | | | | | | | | -------------------------------------------------------------------------------------------------- Example 3: This example demonstrates a FTP data transfer utilizing POSIX name space. Table A-20. ----------------------------------------------------------------------------------------------- | | | :listf testdata,2 | | | ----------------------------------------------------------------------------------------------- | | | | | | | ACCOUNT = | SYS | GROUP= PUB --------LOGICAL RECORD | ----- SPACE ----- | | | FILENAME | CODE | -------- | | | | | | | | | ----------------------------------------------------------------------------------------------- | | | | | | | | | | | | | TESTDATA | SIZE | TYP FA | EOF 13820 | LIMIT | R/B 16 | | SECTORS | #X 1 | MX * | | | | 80B | | | 13820 | | | 4320 | | | | | | | | | | | | | | | | ----------------------------------------------------------------------------------------------- Table A-21. ------------------------------------------------------------------------------- | | | | | 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: Table A-22. --------------------------------------------------------------------------------- | | | | | 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; Table A-23. -------------------------------------------------------------------------------- | | | 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) | | | --------------------------------------------------------------------------------


MPE/iX 5.0 Express III Documentation