Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)

Procedure Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual426750-003
6-89
RECONNECT MODEM Statement
CODE RC-2 YIELDS R-MSG-2
TIMEOUT MAX-TIME
ON ERROR GOTO ERROR-HANDLER.
PERFORM ONE OF MSG-1-RCD
MSG-2-RCD
DEPENDING ON TERMINATION-STATUS.
ERROR-HANDLER.
IF TERMINATION-STATUS = 1 AND
TERMINATION-SUBSTATUS = 40
PERFORM RCV-TIMED-OUT
ELSE
PERFORM ANALYZE-ERROR.
This code executes as follows:
1. The RECEIVE UNSOLICITED MESSAGE statement waits for the arrival of an
unsolicited message. If the unsolicited message queue for this SCREEN COBOL
program contains a message, the operation completes immediately; otherwise,
the RECEIVE UNSOLICITED MESSAGE statement waits for the arrival of an
unsolicited message or a timeout.
2. When the unsolicited message arrives, the RECEIVE UNSOLICITED MESSAGE
statement moves the message to R-MSG-1 or R-MSG-2 depending on the receive
code value. The statement also moves a number 1 or 2 into the TERMINATION-
STATUS register depending on the position of the receive code in the statement.
If there are no errors and the RECEIVE UNSOLICITED MESSAGE statement does
not time out, the special register TERMINATION-STATUS is set as follows:
RECEIVE CODE TERMINATION-STATUS
RC-1 1
RC-2 2
3. If the RECEIVE UNSOLICITED MESSAGE statement times out or there is an
error, the statement sets the TERMINATION-STATUS and TERMINATION-
SUBSTATUS registers accordingly and performs the procedure ERROR-
HANDLER.
For an explanation of the error numbers contained in TERMINATION-STATUS,
see Tab l e 6-5.
RECONNECT MODEM Statement
The RECONNECT MODEM statement gives a SCREEN COBOL program control of
the connection to a Pathway/iTS terminal or intelligent device across a dial-in switched
line (a standard communication line used by the public telephone system).
Pathway/iTS does not support a dial-out capability over a switched line.
RECONNECT MODEM