Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)
Procedure Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001
6-64
RESET Statement
ON ERROR imperative-stmt
specifies action to be taken should an error occur in sending the message. If an error
occurs, imperative-stmt is executed. The TERMINATION-STATUS special
register contains a value indicating the cause.
Consider the following SCREEN COBOL example that uses the REPLY TO
UNSOLICITED MESSAGE statement:
PROCEDURE DIVISION.
MESSAGE-RESPONSE.
REPLY TO UNSOLICITED MESSAGE WITH MY-REPLY
ON ERROR PERFORM ERROR-HANDLER.
ERROR-HANDLER.
IF TERMINATION-STATUS = 1
PERFORM ANALYZE-GUARDIAN-ERROR
ELSE
PERFORM ANALYZE-ERROR.
The REPLY TO UNSOLICITED MESSAGE statement executes as follows:
1. The statement sends the contents of MY-REPLY in response to the last unsolicited
message.
2. If there is an error, ERROR-HANDLER is performed. If there is a file system error,
the TERMINATION-STATUS register contains a 1 and the TERMINATION-
SUBSTATUS register contains the error number; otherwise, TERMINATION-
STATUS contains the error number.
Refer to later in this section for an explanation of the error numbers contained in
TERMINATION-STATUS.
RESET Statement
The RESET statement restores the display attributes and the data of screen fields to the
compile-time definition. The statement restores only the terminal display, not the
internal data.
RESET cannot be used by programs communicating with intelligent devices.
TEMP or TEMPORARY
specifies that the selected fields are to be reset only if they have received their
current values or attributes from a DISPLAY TEMP or TURN TEMP statement.
RESET [ TEMP ] [ ATTR ] { screen-identifier } ,...
[ TEMPORARY ] [ DATA ]
[ DEPENDING [ ON ] identifier ]
[ SHADOWED ]