SNAX/APC Application Programming Manual

Verb Definitions
SNAX/APC Application Programming Manual138786
3-98
TP-READY Verb
TP-READY Verb
A local TP uses the TP-READY request to initiate communication with the SNAX/APC
process. The TP-READY request must be the only UOW in the IPC message; it cannot
be concatenated with other UOWs.
When a local TP issues a TP-READY request, it should set the RESOURCE-ID field in
the IPC request header to all 0s (in COBOL, use LOW-VALUES). The RESOURCE-ID
field in the IPC reply header contains the new resource ID. This resource ID is then
used by the TP until the TP releases the resources by issuing a TP-END request. A local
TP started by the Dispatcher must specify a resource ID containing all 0s.
If a TP has several consecutive conversations that use the same LU-LU session, the TP
can use the same resources (and thus the same resource ID) for each conversation,
provided the TP does not issue a TP-END request between conversations.
Note that although it is possible, and quite common, to create multithreaded processes
(for example, a credit-checking application that handles multiple inquiries by
timesharing), each conversation requires its own operating system open. If a TP wants
multiple IPC messages outstanding, then the TP should issue multiple opens.
A TP may use the same resource ID for consecutive conversations using the same local
resources (LU, TP name). To do this, the TP does not issue a TP-END when each
conversation ends. This behavior guarantees resources will be available, but also
prevents these resources from being available to other conversations, so this strategy
should be used with care.
When the local TP issues a TP-READY request to start a conversation (as a source TP),
it must specify LOCAL-ATTACH (Y in TR-LOCAL-ATTACH-INDICATOR). If a TP-
READY request specifies LOCAL-ATTACH, SNAX/APC completes the request
immediately.
When the local TP issues a TP-READY request because it is waiting for a remote TP to
start a conversation (the local TP is a target TP), it must specify NOT-LOCAL (N in TR-
LOCAL-ATTACH-INDICATOR). A TP-READY request that specifies NOT-LOCAL
completes when an attach is received for that TP from a remote TP.
A TP that waits for a remote TP to start a conversation can either wait for a conversation
request on a specific local LU (a specific TP-READY) or wait for a conversation request
on any local LU (a general TP-READY). A TP requests a specific TP-READY by
indicating a specific LU name in the TR-APC-LUNAME field of a TP-READY request.
A TP requests a general TP-READY by specifying an asterisk (*) in the TR-APC-
LUNAME field. Note that the TP must be configured for general TP-READY support.
This is done by configuring the TPN object with the attribute GENERAL-TP-READY
set to “Yes”. SCF is used to configure the TPN object. TPN is the mnemonic for TP-
NAME.
When the local TP issues a TP-READY request because it was started by the Dispatcher,
it must specify NOT-LOCAL (N in TR-LOCAL-ATTACH-INDICATOR) and Y in TR-
DISPATCHED-INDICATOR. This TP-READY request completes immediately because
an attach is waiting (the attach caused the Dispatcher to start the TP in the first place).