Table 6-5. Comparison of Logical Record Formats

Fixed-length

Variable-length

Unde￿ned-length

 

 

 

File System knows data length

File System knows data length

File System does not kno w data

 

 

length

All records same length

Record length varies

Record length v aries

Record space contains only data

Record space contains data plus

Record space con tains data plus

 

byte count

￿ller

Request actual record size

Request maximum record size

Request maximum record size

 

 

 

Specifying a Record Size

You can specify the size of records in y our ￿le by using one of the follo wing: MPE/iX command :BUILD (for disc ￿les)

MPE/iX command :FILE

HPFOPEN or FOPEN intrinsic

You can specify your own record size or accept the default size for the device y ou are using. MPE/iX default record sizes for devices are sho wn in Table 6-6. Subsystem defaults may be di￿erent from MPE/iX defaults. F or example, the Editor default can be 72 or 80 bytes, depending on the text format, while the MPE/iX standard default is the record size con￿gured for the device. F or detailed information on specifying a record size, refer to Accessing Files Pr ogrammer's Guide (32650-90017).

Table 6-6. Standard Default Record Sizes

Device

Record Size (Bytes)

 

 

Disc

256

Magnetic tape unit

 

256

Terminals (most)

 

80*

Line printer

132*

Plotter

 

510

 

* Controlled by con￿gured

 

 

record length.

 

 

The File System sets up all records (ASCII and binary) to begin on 2-b yte boundaries for device ￿les. Even if you specify an odd-b yte record, the next record cannot begin in the next byte. In this case, the File System adjusts the record size b y adding one byte to make the next record begin on a w ord boundary. If the ￿le is ASCII, the extra b yte is made inaccessible

6-24 File System