The procedures for the second sort and inventory update runs are similar to those just described. The sort program sorts the sales order file on the other secondary key Inventory Number. The inventory update program reduces the Quantity-on-Hand field in the affected inventory records by the Quantity Sold field in each sales order record. A new inventory master file is created in the process. Figure 9.3 illustrates the process.