SNAX/APC Application Programming Manual

Using the Application Program Interface
SNAX/APC Application Programming Manual138786
1-8
Error Handling
in all UOW headers in the IPC message. If one UOW fails the parameter check, the IPC
header is returned with an error; SNAX/APC processes no UOWs in the IPC message.
If the UOWs pass the parameter check but a UOW is still found in error while
processing verbs, processing of the IPC message stops at the UOW in error.
Detecting errors in the conventions that your TPs use to carry on conversations and
exchange data is the responsibility of your application design and programming.
When a TP detects an error, it can either issue the DEALLOCATE (ABEND-PROG)
verb and restart the conversation, or it can issue a SEND-ERROR verb (for TP data
errors).
If a local TP receives RC-DEALLOCATE-ABEND-PROG (or, in the case of the
mapped equivalent verb, RC-DEALLOCATE-ABEND) in REPLY-RETURN-CODE
and the REP-RETURN-CODE-DETAIL field contains RCD-ABEND-TP-REMOTE,
the TP should immediately issue the DEALLOCATE (LOCAL) verb.
The REP-RETURN-CODE-DETAIL field indicates whether the conversation was
deallocated by the remote TP or by the local SNAX/APC process. If REP-RETURN-
CODE-DETAIL contains RCD-ABEND-TP-REMOTE (0), the conversation was
deallocated by the remote TP; if the field contains RCD-ABEND-TP-LOCAL (1), the
conversation was deallocated by the local SNAX/APC process and the conversation is in
Reset state.
If the TP receives RC-DEALLOCATE-ABEND-PROG (or, in the case of the mapped
equivalent verb, RC-DEALLOCATE-ABEND) and the resource ID is nonzero,
the TP can issue only DEALLOCATE-LOCAL). If the resource ID is zero (0), the
conversation has been deallocated (and the resource returned); the TP can issue only TP-
READY.
CANCEL Message Processing
CANCEL message support is available with SNAX/APC. CANCEL message support
simplifies recovery from the problem of unresponsive partners and the problem of
cleaning up resources when a SCREEN COBOL or Pathsend requester program
terminates unexpectedly. With CANCEL message support, the application can recover
from an unresponsive partner by issuing a CANCEL message, either explicitly by
calling the CANCEL or CANCELREQ system procedures or implicitly by using the
time out feature of AWAITIO or SERVERCLASS_SEND_. In the Pathway
environment, SNAX/APC does not receive the CLOSE message typically received when
a requester terminates. If a SCREEN COBOL or Pathsend requester has a request
outstanding to SNAX/APC when it stops, SNAX/APC receives a CANCEL message for
that request.
SNAX/APC allows an application to pack multiple verbs into a single request, known as
an IPC (interprocess communication). SNAX/APC allows only one IPC to be
outstanding at any one time on any given open. When SNAX/APC sends a reply to the
application, the reply is for the entire IPC. If the IPC contains multiple verbs, the reply
contains the response for each of the included verbs.
One function of CANCEL processing is to reply to the outstanding IPC immediately.
This reply frees the open so that the application can issue another request (typically a
new TP-READY). Note that the application does not receive the reply to a cancelled