Mapping the seat file

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

Table 1. LREC Fields for the Seat File
Field No. of bytes
size 2
key 1
seat number 4
seat class 1
passenger name 25
passenger number 8
pointer to passenger file 5
Total 46

From this table, you can see that each LREC in the seat file contains 46 bytes.

Because the average number of passengers on each flight is 150, you can calculate the amount of data as follows:

no. of passengers on each flight x LREC size = amount of data

The calculation is:

150 x 46 = 6900 bytes

Some aircraft can carry as many as 300 passengers while others can carry only 50. Because data must be kept for all the different aircraft types, you must also calculate the maximum and minimum data requirements.

The calculations are as follows:

300 x 46 = 13800 bytes (maximum)50 x 46 = 2300 bytes (minimum)

Because the seat file is referenced from the flight file (Table 29), you should create it as a pool file. As a pool file, it is allocated only as needed. If you create the seat file as a fixed file, it is permanently allocated and must be defined for every file. Therefore, you must consider the size of the file as well.

Distributing the seat file LRECs

Because 4‑K blocks hold only 4033 bytes of user data, some chaining is required in this file. The chain lengths range from 1 to 4. You need four blocks to store the number of seats in the largest aircraft.

When you distribute the seat file LRECs, use algorithm #TPFDBFF to indicate that the seat file is an index file.