Ch 13. Sequential File Processing
The Big Picture
- Master File: Major collection of data pertaining to a specific
application. Must be sorted by a "key" field.
- Transaction file: Batch data to be used for updating the "Master" file.
Contains all changes that have occured since "Master" was created
or last updated. Must be sorted by a "key" field.
- Master and Trans. files must be in sequence by the same key
field.
Update Logic
IF TRANS-KEY = MASTER-KEY
Update the Master Record
IF TRANS-KEY > MASTER-KEY
Move the Master record to New-Master File
IF TRANS-KEY < MASTER-KEY
Add the Trans. record to the master record