Mapping the seat file

Each LREC in the seat file contains the fields shown in Table 1. Table 1 also shows the number of bytes in 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 1), 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.