SNAX/APC Application Programming Manual

Verb Definitions
SNAX/APC Application Programming Manual138786
3-67
MC-RECEIVE-AND-WAIT Verb
If the MC-RECEIVE-AND-WAIT verb is issued in the Receive state, the following
return codes can be returned in REP-RETURN-CODE of RWR-HEADER:
RC-OK
RC-ALLOCATION-ERROR
RC-BACKOUT-NO-RESYNC
RC-BACKOUT-RESYNC
RC-DEALLOCATE-ABEND-PROG
RC-DEALLOCATE-NORMAL
RC-PROGRAM-ERROR-NO-TRUNC
RC-PROGRAM-ERROR-PURGING
RC-PROGRAM-ERROR-TRUNC
RC-RESOURCE-FAIL-NO-RETRY
RC-RESOURCE-FAIL-RETRY
Considerations
REQUEST-TO-SEND notification is usually received in the Send state but can be
received in Receive state under one of the following three conditions:
The local TP just entered Receive state, and the remote TP issued REQUEST-
TO-SEND.
The remote TP issued the PREPARE-TO-RECEIVE verb and then issued
REQUEST-TO-SEND before the local program entered Send state.
Because the REQUEST-TO-SEND is transmitted as an expedited request, it can
arrive ahead of the request carrying the SEND indication. The local TP cannot
distinguish this condition from the first condition (local TP entered Receive state
as remote issued REQUEST-TO-SEND). However, if the remote TP waits until
it receives information from the local TP before it issues the REQUEST-TO-
SEND, this ambiguity can be avoided.
The remote TP issued REQUEST-TO-SEND in Send state.
When the remote TP issues a DEALLOCATE (FLUSH) verb request, the local
TP receives notification (RC-DEALLOCATE-NORMAL) in RWR-RETN-
CODE. First the TP receives the flushed data with RC-OK; on the next
RECEIVE-AND-WAIT verb request, the local TP receives DEALLOCATE
(NORMAL). Thus, a return code other than RC-OK does not necessarily
indicate that an error occurred.
When a TP receives an MC-RECEIVE-AND-WAIT reply, it should check both the
REP-RETURN-CODE and WHAT-RECEIVED fields for exception conditions.
If an MC-RECEIVE-AND-WAIT verb is processing when SNAX/APC receives a
CANCEL system message from the application program, SNAX/APC deactivates
the session and replies to the cancelled IPC. SNAX/APC frees the internal resources
after finishing the processing of the verb.
If a TP has been configured to perform character mapping, then character translation
on inbound data for an MC-RECEIVE-AND-WAIT verb is performed as configured
using whatever character map was specified.