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

Procedure Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual426750-003
6-87
RECEIVE UNSOLICITED MESSAGE Statement
RECEIVE UNSOLICITED MESSAGE Statement
The RECEIVE UNSOLICITED MESSAGE statement reads an unsolicited message
into Working-Storage. The message is either read directly into Working-Storage or is
mapped through the Message Section.
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.
RECEIVE UNSOLICITED [ MESSAGE ]
[ CODE FIELD [ IS ]
code-field
]
{ YIELDS
rcv-message
}
{ }
{ { CODE
rcv-code
[,
rcv-code
]... YIELDS
rcv-message
}... }
[ TIMEOUT
timeout-value
]
[ ON ERROR
imperative-stmt
]