HPlogo HP ARPA File Transfer Protocol User's Guide > Chapter 6 MPE/iX File System and Data Transfers

File Transfer Examples

MPE documents

Complete PDF
Table of Contents
Index
Glossary

E0300 Edition 6 ♥
E1098 Edition 5

The following examples show how files are stored and retrieved between an MPE/iX system and a UNIX system using FTP.

Variable Record Files


The first example in Figure 6-1 "ASCII Transfer" shows an FTP user on MPE/iX transferring an ASCII file to a UNIX system then retrieving the file with the original record structure intact.

AFILE is stored with the attributes: REC=-80,1,V,ASCII. AFILE can contain records of up to 80 characters. The records are of variable length. The file transfer is performed:

  (1)
  ftp> ascii
  ftp> put afile xxfile

The UNIX file system stores the data in a contiguous stream, separated by carriage return characters (<cr>).

To retrieve the file as it was originally stored, the MPE/iX FTP user can do the following:

  (2)
  ftp> ascii
  ftp> get xxfile xxfile;rec=-80,1,v,ascii

Figure 6-1 ASCII Transfer

[ASCII Transfer]

Mixed Mode Transfer


If you transfer an ASCII type file in binary mode, you may not be able to retrieve the file in its original form as pictured in Figure 6-2 "Mixed Mode Transfer".

An MPE/iX ASCII file, AFILE, transferred to the UNIX system using FTP binary transfer mode results in a file of contiguous data on the UNIX system. Note that record structure is not maintained in binary transfers.

  (1)
  ftp> binary
  ftp> put afle yyfile

When the user tries to retrieve the file using file building parameters (rec=-80,1,v,ascii), the file is retrieved as one record (since the total amount of data is less than 80 bytes).

  (2)
  ftp> binary
  ftp> get yyfile yyfile;rec=-80,1,v,ascii

Figure 6-2 Mixed Mode Transfer

[Mixed Mode Transfer]

Fixed Record Files


Transferring files that contain imbedded carriage return-line feed characters (<cr> <lf>) can be a problem if you try to transfer these files in ASCII mode. In FTP ASCII transfer mode, the remote system interprets a carriage return-line feed pair (<cr> <lf>) as a new record. One method of transferring a fixed file to a remote system then retrieving it with the data and record structure intact is pictured in Figure 6-3 "Fixed Record Transfer". An MPE/iX FTP user transfers an ASCII file with fixed length records of 132 bytes long to a UNIX system in FTP binary mode as follows:

  (1)
  ftp> binary
  ftp> put FXFILE uxfile

On the UNIX system, the file is stored as a contiguous stream, including the spaces. To retrieve the file and maintain the original record structure, the MPE/iX user must use the GET command with the following build parameters:

  (2)
  ftp> binary
  ftp> get uxfile uxfile;rec=-132,,f,ascii

Figure 6-3 Fixed Record Transfer

[Fixed Record Transfer]




MPE/iX File System


Chapter 7 Troubleshooting