HP 3000 Manuals

Building and Transferring a Bytestream File [ HP ARPA File Transfer Protocol User's Guide ] MPE/iX 5.0 Express III Documentation


HP ARPA File Transfer Protocol User's Guide

Building and Transferring a Bytestream File 

These examples create a bytestream file in the POSIX shell and MPE
namespace with the vi editor and then transfers that file to a remote
system with FTP.

Example 1:

File transfer HP3000 MPE/iX to HP3000 MPE/iX system.

                                Table A-13.   

--------------------------------------------------------------------------------------------------
|                                                                                                |
| :sh                                                                                            |
|                                                                                                |
--------------------------------------------------------------------------------------------------
|                                                                                                |
| ####################################################################################           |
|                                                                                                |
--------------------------------------------------------------------------------------------------
|                       |                                                                        |
|                       | MPE/iX Shell and Utilities (A.00.00)                                   |
|                       |                                                                        |
--------------------------------------------------------------------------------------------------
|     |                                                                                          |
|     | COPYRIGHT (C) Hewlett-Packard Company 1992, All Rights Reserved.                         |
|     |                                                                                          |
--------------------------------------------------------------------------------------------------
|                                                                                                |
| ####################################################################################           |
|                                                                                                |
--------------------------------------------------------------------------------------------------
|                                                                                                |
| shell/iX > vi                                                                                  |
|                                                                                                |
--------------------------------------------------------------------------------------------------
|                       |                                                                        |
|                       | This is a test file with sample data.                                  |
|                       |                                                                        |
--------------------------------------------------------------------------------------------------
|                                                                                                |
| ~                                                                                              |
|                                                                                                |
--------------------------------------------------------------------------------------------------
|                                                                                                |
| :w bytestrm                                                                                    |
|                                                                                                |
--------------------------------------------------------------------------------------------------
|                                                                                                |
| shell/iX> ls bytestrm bytestrm                                                                 |
|                                                                                                |
--------------------------------------------------------------------------------------------------
|                                                                                                |
| shell/iX> /SYS/ARPA/FTP File Transfer Protocol [A0006018] (C)                                  |
| Hewlett-Packard Co.  1990                                                                      |
|                                                                                                |
--------------------------------------------------------------------------------------------------
|                                                                                                |
| ftp> :LISTFILE /SYS/PUB/bytestrm PATH= /SYS/PUB/                                               |
|                                                                                                |
--------------------------------------------------------------------------------------------------
|                                                                                                |
| bytestrm                                                                                       |
|                                                                                                |
--------------------------------------------------------------------------------------------------
|                                                                                                |
| ftp> pwd 257-"/SYS/WORK" is the current directory.  257                                        |
| ",MANAGER.SYS,WORK" is the current session.                                                    |
|                                                                                                |
--------------------------------------------------------------------------------------------------
|                                                                                                |
| ftp> put /SYS/PUB/bytestrm 200 PORT command ok.  150 File:                                     |
| ./bytestrm;REC=,,B;DISC=2147483647,8 opened; data connection will be                           |
| opened 226 Transfer complete.  38 bytes sent in 0.00 seconds (18.55                            |
| Kbytes/sec)                                                                                    |
|                                                                                                |
--------------------------------------------------------------------------------------------------
|                                                                                                |
| ftp> dir ./bytestrm 200 PORT command ok.  150 File:  LISTFILE .bytestrm,2                      |
| opened; data connection will be opened                                                         |
|                                                                                                |
--------------------------------------------------------------------------------------------------
|  |                                                       |                        |            |
|  | PATH= /SYS/PUB/ CODE ------------LOGICAL              | ----- SPACE -----      | FILENAME   |
|  | RECORD ------------                                   |                        |            |
|  |                                                       |                        |            |
--------------------------------------------------------------------------------------------------
|  |  |        |        |         |            |           |          |      |      |            |
|  |  | SIZE   | TYP BA | EOF 38  | LIMIT      | R/B 1     | SECTORS  | #X 1 | MX   | bytestrm   |
|  |  | 80B    |        |         | 2147483647 |           | 16       |      | 32   |            |
|  |  |        |        |         |            |           |          |      |      |            |
--------------------------------------------------------------------------------------------------
|                                                                                                |
| 226 Transfer complete.  230 bytes received in 0.01 seconds (24.96                              |
| Kbytes/sec)                                                                                    |
|                                                                                                |
--------------------------------------------------------------------------------------------------

Example 2:

File transfer HPUX (unix) system to HP3000 MPE/iX system.

                                Table A-14.   

--------------------------------------------------------------------------------------------------
|                                                                                                |
| vi bytestrm                                                                                    |
|                                                                                                |
--------------------------------------------------------------------------------------------------
|                       |                                                                        |
|                       | This is a bytestrm test data file.                                     |
|                       |                                                                        |
--------------------------------------------------------------------------------------------------
|                                                                                                |
| :wq "bytestrm" [New file] 1 lines, 34 characters                                               |
|                                                                                                |
--------------------------------------------------------------------------------------------------
|                                                                                                |
| ftp> put bytestrm ./bytestrm;rec=,,b 200 PORT command ok.  150 File:                           |
| ./bytestrm;rec=,,b opened; data connection will be opened 226 Transfer                         |
| complete.  35 bytes sent in 0.00 seconds (64.73 Kbytes/sec)                                    |
|                                                                                                |
--------------------------------------------------------------------------------------------------
|                                                                                                |
| ftp> dir ./bytestrm 200 PORT command ok.  150 File:  LISTFILE ./bytestrm,2                     |
| opened; data connection will be opened                                                         |
|                                                                                                |
--------------------------------------------------------------------------------------------------
|  |                                                       |                        |            |
|  | PATH= /SYS/WORK/ CODE ------------LOGICAL             | ----- SPACE -----      | FILENAME   |
|  | RECORD ------------                                   |                        |            |
|  |                                                       |                        |            |
--------------------------------------------------------------------------------------------------
|  |  |        |        |         |         |              |          |      |      |            |
|  |  | SIZE   | TYP BA | EOF 35  | LIMIT   | R/B 1        | SECTORS  | #X 1 | MX 8 | bytestrm   |
|  |  | 1B     |        |         | 204800  |              | 16       |      |      |            |
|  |  |        |        |         |         |              |          |      |      |            |
--------------------------------------------------------------------------------------------------
|                                                                                                |
| 226 Transfer complete.                                                                         |
|                                                                                                |
--------------------------------------------------------------------------------------------------


NOTE When transferring a Bytestream file from UNIX to a MPE/iX system it is necessary to specify ";rec=,,b". This is required as a result of FTP/iX supporting a default of "fixed" file type rather than bytestream which is the default on UNIX and POSIX systems.
Example 3: File transfer HP3000 MPE/iX system to HPUX (UNIX) system. Table A-15. ---------------------------------------------------------------------- | | | ftp> bytestream 200 Type set to L (byte size 8). ftp> put | | ./bytestrm 200 PORT command successful. 150 Opening BINARY | | mode data connection for ./bytestrm. 226 Transfer | | complete. 35 bytes sent in 0.00 seconds (+INF Kbytes/sec) | | ftp> dir ./bytestrm 200 PORT command successful. 150 | | Opening ASCII mode data connection for /bin/ls. | | | ---------------------------------------------------------------------- | | | | | | -rw-r--r-- | 1 jph | network | 35 Jun 20 16:19 ./bytestrm | | | | | | ---------------------------------------------------------------------- | | | 226 Transfer complete. 66 bytes received in 0.18 seconds | | (0.37 Kbytes/sec) | | | ----------------------------------------------------------------------


MPE/iX 5.0 Express III Documentation