6100 MPS-B Programming Manual

WRITING APPLICATIONS THAT USE 6100 MPS-B
Recovering From Errors
RECOVERING FROM ERRORS
There are two ways a 6100 MPS-B application becomes aware of
errors:
A file system call completes with a condition code other than
zero.
A WRITEREAD call completes with a condition code of zero, but
the status field in the response buffer contains an error
code. In some cases, a status detail code associated with the
status error code is returned in the response buffer text
field.
The hierarchy among the different kinds of errors and the ways
they are reported makes for an orderly error trapping and
recovery procedure:
1. The application calls AWAITIO to complete an earlier nowait
request.
2. If the call completed with a condition code other than zero,
the application calls FILEINFO to discover the error.
Appendix A describes each of the file system errors and the
means of recovery.
3. If a WRITEREAD call completed with a condition code of zero,
the application examines the status field in the WRITEREAD
buffer; that field contains either a zero or a code other
than zero. The meanings of the status codes are described
later in this section.
4. For certain status error codes, a status detail code can be
found in the text field of the WRITEREAD response buffer.
The meanings of the status detail codes are described later
in this section.
Notice that when a WRITEREAD call completes with a condition code
of zero, that doesn’t mean the application request completed
without error. It means the request successfully reached the
protocol task, which may or may not have succeeded in its
execution. To determine whether the request succeeded, you have
to examine the WRITEREAD buffer; a value of zero in the status
field indicates that everything worked.
Sometimes error recovery entails simply repeating the last
request, or making a small correction and then repeating the
request. At other times, it can involve making a new bid for the
line, disconnecting the line and connecting it again, or even
stopping the line with CMI until the problem has been solved.
3-6