Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)
Procedure Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual—426750-003
6-38
DIALOG-BEGIN
reply-code-value
is an integer literal or integer data item that specifies an expected reply code from
the server. The maximum number of reply code values associated with one
YIELDS clause is 255. TERMINATION-STATUS can be used to identify the actual
reply code received.
VARYING
controls error logging when variable-length replies are expected. When the ON
ERROR clause is present, the keyword VARYING suppresses the logging of error
3115 (TRANSACTION REPLY SIZE INVALID) when the reply is shorter than the
YIELDS buffer. However, error 3115 will always be logged when the reply length
exceeds the length of the YIELDS buffer. The keyword VARYING has no effect
unless the ON ERROR clause is present.
identifier-2
is a data name in which a section of the contents of the server reply message will
be placed.
CODE OTHER
ensures that a match on the reply code will always occur, thus preventing the
logging of error 3112 (REPLY NUMBER NOT KNOWN TO PROGRAM) when the
actual reply code is not found in the list of expected reply codes. The CODE
OTHER clause can appear by itself when no explicit reply codes are expected.
The CODE OTHER clause must be the last CODE clause in the DIALOG-BEGIN
verb. If it is followed by a CODE
value
clause, SCREEN COBOL reports error
616 (’CODE OTHER’ must be the last statement in the reply code list of DIALOG-
BEGIN). Reply code values must not appear in the same CODE clause as the
keyword OTHER. The sequence CODE 1 2 OTHER produces error 44 (SYNTAX
ERROR DETECTED AT TOKEN) and error 48 (PARSING RESUMED AT
TOKEN). The sequence CODE OTHER 1 2 produces the same error.
ON ERROR
provides a point of control if an error occurs in sending the message or the server
abends the dialog.
If this clause is omitted and an error is detected, the standard system action is
performed. Depending on the error, system action involves either waiting for a
resource to be available or suspending execution of the program.
Errors that occur during execution of a DIALOG-BEGIN statement can be
searched by number in the TERMINATION-STATUS special register to determine
the meaning and recommended action. For some errors, additional information is
reported in the TERMINATION- SUBSTATUS special register.










