I/O Errors with File System
If an error occurs during the I/O process, the programmer can make very few assumptions about the state of the file written or the variables read. If the error occurs while positioning the file pointer, then the file pointer will normally be where it was before the error. If the error occurs during I/O processing, no guarantees are made regarding the amount of data that was actually transferred. If an end-of-record error occurs on a write, do not assume that data up to the end of record has been successfully written.
It is desirable for an application program to report the cause of an error to the user, especially if the cause of the error is an empty floppy drive or a printer that is not turned on. The PRO/5 error codes break down I/O errors into several specific causes. Unfortunately, PRO/5 relies on the host system to tell it the cause of the error. Some host systems are not as specific as PRO/5. When programming traps for specific I/O errors, keep in mind the possibility of I/O error codes being less specific than those documented.