Mapping the aircraft file

The following table shows the fields in each LREC in the aircraft file and the number of bytes for each field.

Table 1. LREC Fields for the Aircraft File
Field No. of bytes
size 2
key 1
aircraft type 4
seat range 8
seat class 1
Total 16

Each LREC in the aircraft file therefore contains 16 bytes.

Because the database must be able to accommodate 50 aircraft types and three classes, you can calculate the required amounts of data as follows:

no. of aircraft types x no. of classes x LREC size = amount of data

The calculation is:

50 x 3 x 16 = 2400 bytes

This comparatively small number of bytes fits comfortably into a fixed block of size L4 (4095 bytes, including header and trailer). Because only one block is required, you can use a miscellaneous file.

Distributing the aircraft LRECs

The aircraft file contains only one block of data. Because of this, all the data can be stored in a single subfile, and you do not need to distribute the aircraft LRECs across multiple subfiles. Since the file uses a single subfile, use the single‑subfile algorithm (#TPFDB04) to distribute the LRECs.

Note: The flight file (see Figure 14) contains a pointer to the aircraft file. However, because the aircraft file contains only 1 block, the aircraft file address always locates the correct block. Because of this, you can remove the pointer from the flight file.

Allowing for expansion

Although the aircraft file is small now, it may need to expand in the future. Therefore, consider how you will handle a potential data overflow.

Because the aircraft LRECs are only 16 bytes long, the current L4 block (4095 bytes) already provides space for expansion. Overflow blocks with an L2 size of 1055 bytes should be sufficient for future growth.

File structure

When deciding the structure of the LRECs, consider how the TPFDF product will interrogate the file. The aircraft file is not an index file, so the LRECs do not need to contain pointers. The TPFDF product needs only the aircraft type, so the aircraft LREC structure can be as follows:

Alternative text description not available.