Information Technology Reference
In-Depth Information
All along the way as we read, write and delete records, we need to check the
statuses of the access to the files. We don't anticipate problems but files can mysteriously
disappear and the status checks we perform prevent the program from abruptly ending. If
somehow the program does end, at least we'll have a message telling us why that
happened. Unfortunately it won't spell out who is the culprit behind the problem.
Many of the procedures are very familiar such as
input-number,
print-headings
and
get-city-state .
They have been changed slightly but the process is similar to earlier versions of these
routines. The new procedures are
process-delete
and
remaining-process .
The former deletes the account record - similar to a keyed read or write - and checks the
file status after the delete and the procedure
remaining-process
gets the report line ready and prints it as well as taking care of adding a record with the
deleted account number to the next number file so that it can be used again. We changed
the
end-program
procedure to print the count of the number of records that have been deleted. In addition,
if there is a serious file problem, an error message will be displayed at the bottom of the
screen as well as on the report.
Search WWH ::




Custom Search