A master file is updated based on a plurality of transaction files by
reading the master file exactly once. A record and its associated key
value are read from each of the files. A current key value is set to an
optimum of the last-read key values for all of the files. A record in the
updated master file is based on the last-read record from each of the
files whose last-read key value equals the current key value. A record
and its associated key are attempted to be read from each of the files
whose last-read key value equals the current key value. For each file
being read, the last-read key value is updated, and the above acts are
repeated.