Pathway/iTS TCP and Terminal Programming Guide

Processing Unsolicited Messages
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide426751-001
7-6
UMP Programming Examples
The TCP rejected one or more unsolicited messages and replied to their sender without
delivering them to their target requester. This message is seen only if unsolicited
messages are arriving and being rejected with sufficient frequency that the TCP cannot
log individual error messages for each rejected unsolicited message.
For cause, effect, and recovery information for these messages and other TCP messages,
refer to the Compaq NonStopPathway/iTS System Management Manual.
UMP Programming Examples
The subsections that follow present a series of annotated programming examples
illustrating various approaches to unsolicited-message processing within SCREEN
COBOL requesters.
Polling the PW-UNSOLICITED-MESSAGE-QUEUED Register
One method of detecting the arrival of unsolicited messages is to branch periodically to
a paragraph that acts upon the current state of the PW-UNSOLICITED-MESSAGE-
QUEUED register. If the register contains the value YES, the paragraph processes
unsolicited messages from the requester's queue. When the register finally contains the
value NO, control returns to the main processing stream.
.
.
.
PERFORM CHECK-FOR-UNSOLICITED-MESSAGES.
.
.
.
CHECK-FOR-UNSOLICITED-MESSAGES.
IF PW-UNSOLICITED-MESSAGE-QUEUED IS EQUAL TO "YES"
PERFORM process-unsolicited-message
UNTIL PW-UNSOLICITED-MESSAGE-QUEUED IS EQUAL TO "NO".
PROCESS-UNSOLICITED-MESSAGE.
RECEIVE UNSOLICITED MESSAGE
YIELDS ws-unsolicited-message
ON ERROR GO TO analyze-error.
* Do something with ws-unsolicited-message
* and format a reply message.
REPLY TO UNSOLICITED MESSAGE reply-message.
3242 - MULTIPLE UNSOLICITED MESSAGES REJECTED