Pathway/iTS TCP and Terminal Programming Guide

Designing Your Application
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide426751-001
2-15
SCREEN COBOL Requesters
Unsolicited Message Processing
The unsolicited-message processing (UMP) feature of Pathway/iTS makes it possible
for terminals running SCREEN COBOL requesters to accept and reply to unsolicited
messages sent to them by Guardian operating environment processes outside of the
Pathway environment. These external processes can reside anywhere within a Compaq
Expand network. Guardian processes send unsolicited messages to terminals through
their controlling TCP. Such messages consist of an UMP header, which gets interpreted
by the receiving TCP, and the body of the message, which gets passed to the SCREEN
COBOL requester program running at the specified terminal.
Each Pathway/iTS terminal has its own unsolicited-message queue. When the TCP
receives an unsolicited message addressed to one of its terminals, it places the message
in the appropriate queue.
To support the processing of unsolicited messages, you code specific SCREEN COBOL
clauses, statements, and registers in your requester programs. UMP works as follows:
1. A requester detects the arrival of an unsolicited message by testing the contents of
its PW-UNSOLICITED-MESSAGE-QUEUED special register, by performing a
RECEIVE UNSOLICITED MESSAGE statement as a waited input operation, or by
including an ESCAPE ON UNSOLICITED MESSAGE clause in an ACCEPT or
SEND MESSAGE statement.
2. Requesters obtain the text of an unsolicited message by performing a RECEIVE
UNSOLICITED MESSAGE statement.
PROCEDURE DIVISION.
MAIN SECTION.
PERFORM 0100 START
.
.
.
SCREEN MANAGER SECTION. Displays operator screen
DISPLAY ORDER-SCREEN and accepts data from
ACCEPT ORDER-SCREEN UNTIL screen.
SERVER MANAGER SECTION. Sends requests to server,
0200 MOVE ORDER TO. . . handles server reply,
BEGIN-TRANSACTION and commits transaction.
SEND ORDER-MSG TO. . .
.
.
.
REPLY CODE 0 YIELDS. . .
END-TRANSACTION Specifies END-TRANSACTION
unless results of SEND
require ABORT-TRANSACTION.
Example 2-1. Sample SCREEN COBOL Requester Program
Structure (page 2 of 2)