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-60
RECEIVE UNSOLICITED MESSAGE Statement
YIELDS rcv-message
identifies an 01 level message name in either the Working-Storage Section or the
Message Section.
CODE FIELD [ IS ] code-field
defines the location, length, and data type of the rcv-code field in the unsolicited
message. The absence of this clause causes the default:
•
offset—0 bytes offset from beginning of the record
•
length—2 bytes
•
data type—COMPUTATIONAL numeric data item
You need to specify this clause when the location, length, and data type of the rcv-
code field is other than the default.
The code-field parameter in this clause specifies a field name in the Working-
Storage Section. The offset of the specified field from the beginning of its record
dictates the offset of the rcv-code field from the beginning of the unsolicited
message.
The length of the specified field dictates the length of the rcv-code field.
The data type of the specified field dictates the data type of the rcv-code field.
CODE rcv-code
identifies a literal or a data item that specifies which unsolicited message is
expected.
The position of the rcv-code in the CODE rcv-code clause corresponds to a
TERMINATION-STATUS value. One or more rcv-code values can be
associated with each unsolicited message.
A nonnumeric literal must be enclosed within quotation marks.
TIMEOUT timeout-value
specifies a time limit in seconds that the RECEIVE UNSOLICITED MESSAGE
operation will wait for an unsolicited message. The timeout-value can be a
numeric literal or a numeric data item; valid items are 0 through 32,767 seconds.
If the unsolicited message is not received in the specified number of seconds,
TERMINATION-SUBSTATUS is set to 40, the operation is cancelled, and any ON
ERROR clause is executed.
If this clause is omitted, there is no time limit.
ON ERROR imperative-stmt
specifies action to be taken if an error occurs in receiving the message. If an error
occurs, imperative-stmt is executed. The TERMINATION-STATUS special
register contains a value indicating the cause.