SNAX/APC Application Programming Manual

Using the Application Program Interface
SNAX/APC Application Programming Manual138786
1-19
DISPATCHED Request Example
If the REPLY-RETURN-CODE field contains RC-OK, the TP can check the
WHAT-RECEIVED field to determine the type of data received. DATA or
DATA-COMPLETE indicates success. (In Figure 1-5 the local TP receives the
indication DATA in WHAT-RECEIVED because it specified FILL-BUFFER on
the RECEIVE-AND-WAIT verb request.)
If the REPLY-RETURN-CODE field contains DEALLOCATE-NORMAL, the
TP must issue DEALLOCATE (LOCAL).
DATA-INCOMPLETE indicates that the local TP received an incomplete logical record
(the local TP specified APC-FILL-LL in the ALLOCATE request, indicating that it
expects logical record data). The local TP should issue another RECEIVE-AND-WAIT
to receive more data; the cycle should be repeated until the local TP receives either of
the following:
Notification of a transition from the Receive state, specified in the
WHAT-RECEIVED field of the RECEIVE-AND-WAIT reply
The return code RC-DEALLOCATE-NORMAL in a reply UOW
DISPATCHED Request Example
Figure 1-6 illustrates how SNAX/APC establishes a conversation with the aid of the
SNAX/APC Dispatcher in a PATHMON environment. Only target TPs can be
dispatched.
1. As part of the SNAX/APC initialization process, the SNAX/APC Dispatcher
terminal threads are started. When started, each Dispatcher sends a DISPATCHER-
READY request to the SNAX/APC process. This lets SNAX/APC know that a
Dispatcher is available to start requested TP servers. The SNAX/APC process
queues the DISPATCHER-READY request until it receives an ATTACH request for
a local inactive TP.
Figure 1-6. A Dispatched TP
006CDT .CDD
SNA
IBM
Tandem
Remote TP
Local TP
TP-READY request
TP-READY reply
ALLOCATE
(data)
CICS
ALLOCATE / SEND DATA / CONFIRM
DISPATCHER-
READY request
DISPATCHER-
READY reply
DISPATCH-TP
request
Dispatcher
DISPATCH-TP
reply
SNAX/APC
1
2
3
4
5
6
7