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

Procedure Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual426750-003
6-50
DIALOG-END
DIALOG-END
The DIALOG-END statement cleans up resources for the specified dialog after the
server has ended the dialog. A call to DIALOG-BEGIN must be matched by a call to
DIALOG-END/DIALOG-ABORT at the end of the dialog. For the DIALOG-END to work
properly, the server must end the dialog replying with an error value other than
FECONTINUE (preferably FEOK). If a DIALOG-END statement is issued without the
term under active dialog, irrespective of whether ON ERROR clause is specified or not,
TCP aborts the terminal after reporting an error to PATHMON.
ON ERROR
provides a point of control if an error occurs in the DIALOG-END statement.
If this clause is omitted and an error is detected, the standard system action is
performed. Depending on the error, system action involves either aborting or
suspending execution of the SCOBOL program.
The special register TERMINATION-STATUS is set by the DIALOG-END statement to
indicate the result of execution. This table lists the possible values of TERMINATION-
STATUS.
DIALOG-END
[ON ERROR
imperative-statement
]
Termination
Status Meaning
1
The dialog has ended successfully. DIALOG-INFO special register
is reset to 65535.
2
The dialog is outstanding. The server has not ended the dialog.
DIALOG-INFO special register is not changed. Without ON
ERROR clause, the terminal will be aborted.
3
The dialog is invalid for the current operation. This is because of
the primary TCP abending before the dialog could be ended and
the SCOBOL program did not have any prior information about
this. The dialog has already been aborted by the TS/MP ROUT
process. The dialog is now ended from the terminal perspective.
Without the ON ERROR clause, the terminal will be aborted by
TCP.