Total Pageviews

February 15, 2012

Adding and deleting the records on a sequential file


 With sequential file, all the records on the tape (or disk) are in order, perhaps of employee number, so just adding a  new record on the end is not good at all. Of course the records could then be sorted by sorting is a very time consuming process. The best and ‘correct’ way is to make a new copy of the file, copying over all records till new one can be written in its proper place, and then copying over the rest of the records. It’s exactly as if you had just made a list on a nice clean sheet of paper of all the students in the class in order of surname, and then discovered you had left out carter, A.N. the only way to end up with the perfect list is to copy it out again, remembering to include Carter this time.

No comments:

Post a Comment