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

Using BUILD Parameters with FTP

MPE documents

Complete PDF
Table of Contents
Index
Glossary

E0300 Edition 6 ♥
E1098 Edition 5

MPE/iX BUILD command parameters can be used to modify the default file building parameters for files transferred to an MPE/iX system.

When no BUILD command parameters are specified with the target MPE/iX file designation, the MPE/iX FTP server builds the file with the following defaults depending on the transfer mode used:

For ASCII file transfers:

  ;REC=-80,,F,ASCII;DISC=204800

which translates to a file with 80 byte fixed length ASCII records. The maximum number of records the file can contain is 204,800.

For binary file transfers:

  ;REC=-256,,F,BINARY;DISC=204800

which translates to a file with fixed length binary records, with a maximum record size of 256 bytes. The maximum number of records the file can contain is 204,800.

For bytestream file transfers:

  ;REC=,,B;DISC=16384000

which translates to a file with byte length records, with a maximum record size of 1 byte. The default number of records is 16,384,000.

Build Command Parameters


An MPE/iX FTP user can change how a file is copied from a remote system to MPE/iX by using the MPE/iX BUILD command parameters with the GET command using the following syntax:

  ftp> GET remotefile localfile;buildparms

For a remote user (accessing the MPE/iX FTP server), you can save a file on MPE/iX using the following syntax with the PUT command:

  ftp> PUT localfile remotefile;buildparms

Syntax

The supported BUILD command parameters are:

  ;REC=[-rcsizebytes][,blkfactor[,[{F}][,{BINARY}]]]]
                                   {V}   {ASCII}
                                   {B}
  [;DEV=device]
  [;CODE=filecode]
  [;DISC=[numrec][,[numextents][,[initialloc]]]]

Parameters

REC=-recsizeinbytes

A negative value indicates record size in bytes. A positive integer value indicates record size in words (two bytes per word). If DEV= is not specified, the default record size is 128 words.

blkfactor

The default blkfactor size is one. When creating variable length files, include the 1 in the parameter string to maintain the record size specified in the parameter REC=.

F, V, B

Indicates fixed (F), variable (V), byte (B), length records. The default is fixed (F).

BINARY
ASCII

Indicates the type of records the file contains: BINARY for binary coded records or ASCII for ASCII coded records. BINARY is the default.

DEV=device

Specifies where the file will be stored. The default is to a disk file.

CODE=filecode

A code indicating a specially formatted file. Example: CODE=PROG. Default is none.

DISC=numrec

The value that affects file transfer success is numrec. This value sets the maximum number of records the file can contain. Must be large enough for the target file or the file transfer will fail. The default is 1,023 records.

When you specify BUILD parameters in an FTP transfer, you do not have to specify the MPE/iX file type standard (STD) since it is the default. Note that STD is the only supported MPE/iX file type.

For more information about BUILD parameters, use MPE/iX online help (HELP BUILD PARMS), or see the MPE/iX Commands Reference Manual.

Examples Using BUILD Parameters


The first example shows an MPE/iX user transferring a file from the remote system to an MPE/iX system using only the CODE=PROG parameter:

  ftp> GET filex file2;CODE=PROG

The file is created with the BUILD command defaults: fixed binary, 128 word records, with a maximum number of records equal to 1,023.

The second example shows an MPE/iX user transferring a group of binary files from the remote system to an MPE/iX system:

  FTP> BINARY
  200 Type set to l.
  ftp> MGET P* ;CODE=PROG

All files in the set beginning with letter "P" are created with the following attributes: file code label PROG, fixed binary, 128 word records, and a maximum number of records equal to 1,023. The blank space preceding the semicolon is required.

The third example shows a remote user transferring a file from their system to an MPE/iX system using BUILD parameters as follows:

  ftp> PUT myfile MPEFILE;Rec=-256,1,F,BINARY;DISC=11000;CODE=PROG

An MPE/iX fixed binary file named MPEFILE is created with records of 256 bytes, with a maximum record size of 11,000. The file code label is PROG.




How FTP Transfers Files


MPE/iX File System