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

Procedure Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual426750-003
6-52
DIALOG-SEND
identifier-1
is a data item to be sent to the server. The data item represented by this identifier
cannot exceed 32,000 bytes. If
identifier-1
is a variable length data item, the
DIALOG-SEND statement sends only currently defined occurrence (a variable
length data item is an item defined with an OCCURRS DEPENDING ON clause).
If this parameter is omitted, zero bytes are sent to the server. A reply is still
returned from the server.
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.
VARYING
controls error logging when variable-length replies are expected. When the ON
EROR 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 into which a portion of the contents of the server reply message will
be placed.
CODE OTHER
ensures that a match on the reply code will always occur, therefore 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-SEND verb. If
it is followed by a CODE
value
clause, SCREEN COBOL will report error 616
(CODE OTHER must be the last statement in the reply code list of DIALOG-
SEND). Reply code values must not appear in the same CODE clause as the
keyword OTHER. The sequence CODE 1 2 OTHER will produce error 44
(SYNTAX ERROR DETECTED AT TOKEN) and error 48 (PARSING RESUMED
AT TOKEN). The sequence CODE OTHER 1 2 will produce the same error.
ON ERROR
provides a point of control if an error occurs in sending the message or when the
server aborts 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 the program.