![]() |
![]() |
Accessing Files Programmer's Guide: HP 3000 MPE/iX Computer Systems > Chapter 2 Creating A File![]() Specifying Record Size |
|
You can specify the size of the records in your file by using the BUILD (for disk files) or FILE commands, or the HPFOPEN/FOPEN intrinsic; however, the interpretation of the requested record size can be affected by the record structure and data format chosen as well as the device for the file.
When you specify the record size for a fixed-length ASCII file, the record size determined for the file is the same as that which you specified for it. The maximum record size allowed for fixed-length ASCII files is 32767 bytes. To maintain compatibility with pre-900 Series HP 3000 computer systems, the following file types always begin records on half-word boundaries:
For these file types, when you specify an odd-byte record size, the file system rounds up the value to an even number to reflect the fact that these records always begin on half-word boundaries. The maximum record size you can specify for these file types is 32766 bytes. When the file is a binary file or a variable-length ASCII file, the extra byte is available to be used for data. Figure 2-5 “Record Placement for ASCII Files” illustrates the placement of odd-bytes records and the disposition of the added byte. Rather than specify your own record size, you can accept the default record size for the device that you are using. Default record sizes are listed in Table 2-6 “Standard Default Record Sizes”. Note that subsystem defaults may be different from MPE defaults; for example, the Editor default may be 72 or 80 bytes (depending on text format) while the MPE standard default is the record size configured for the device. Table 2-6 Standard Default Record Sizes
|