60 likes | 175 Views
Updateing a Master File from A Transaction File. By Daniel Gillo. First you need to sort the data. Transaction file. 113 – Clare +100. 127 – Anton +100. 098 – Ron +100. 115 – Johann +100. 096 – Ben +100. 160 – Daniel +300. 076 – Mrs. Janesko +100.
E N D
Updateing a Master File from A Transaction File By Daniel Gillo
Transaction file 113 – Clare +100 127 – Anton +100 098 – Ron +100 115 – Johann +100 096 – Ben +100 160 – Daniel +300 076 – Mrs. Janesko +100
To update the file you need to create a new master file and then write the infromation from the old master file with the updates from the transaction file to the new master file. Find the ifromation with the lowest key and write that infromation to the new file.
Old Master File New Master File Transaction file 076 – Mrs. Janesko +100 076 – Mrs. Janesko 200 076 –Mrs. Janesko 300 096 – Ben +100 080 – Gillo 150 098 – Ron +100 090 – Bob 300 113 – Clare +100 096 – Ben 200 115 – Johann +100 096 – Ben 300 098 – Ron 200 127 – Anton +100 098 – Ron 300 160 – Daniel +300 100 – Dave 200 113 – Clare 200 113 – Claire 300 115 – Johann 200 115 – Johann 300 120 – Gerdrud 300 127 – Anton 200 127 – Anton 300
New Master File 076 – Mrs. Janesko 300 080 – Gillo 150 090 – Bob 300 Done! 096 – Ben 300 098 – Ron 300 100 – Dave 200 113 – Claire 300 115 – Johann 300 120 – Gerdrud 300 127 – Anton 300 160 – Daniel 300