Guardian Programmer's Guide

Table Of Contents
Communicating With Terminals
Guardian Programmer’s Guide 421922-014
10 - 38
Responding to Operator Preemption
be retried. If a read operation was being performed, then a message should be sent
advising the user to retype the last entry before retrying the read.
Keep in mind, however, that if more than one process is accessing a terminal and the
BREAK feature is used, only BREAK access should be allowed after BREAK is
pressed. Therefore, subsequent retries are rejected with error 110 until normal access
is permitted.
If either of these errors is received by a process not having BREAK enabled, the
process should suspend itself for some short period (such as 1 second) before retrying
the operation. You can do this by calling the process-control procedure DELAY. If you
use the FILEERROR procedure to retry the failed operation, the delay is applied
automatically.
If the process has BREAK enabled, then you should check $RECEIVE for the system
Break-on-Device message and then take appropriate action.
Responding to Operator Preemption
Error 112 can occur only if the application process is using the same terminal as the
active operator console device. If the application process is reading from the terminal
(using either READ[X] or WRITEREAD[X]) and a message is sent to the operator, the
read operation is aborted and the operator message is written (that is, operator
messages have a higher priority). Any data entered when the preemption takes place
is lost. The application process should therefore send a message to the user to
reenter the data.
Recovering From a Modem Error
Error 140 occurs if the carrier signal to the modem was lost. The carrier loss may be a
permanent or momentary loss. In either case, it must be assumed that the data was
lost.
The first time error 140 occurs, you should send a message to the user to try entering
the data again. If error 140 recurs after you send this message, then the connection
with the remote terminal is lost. You should then call the CONTROL procedure once to
disconnect the modem (operation 12) and then again to wait for modem reconnection
(operation 11).
Recovering From a Path Error
The application should count how many times path errors 201 through 229 occur on a
particular file. Such an error indicates that one path to the associated device has
failed. If the error recurs when you try the operation again, then both paths have failed
and the device is no longer accessible. If the retry succeeds, then either the alternate
path was successful or the process may have created another backup (because of a
IPU reload or an action by the application program).