APPC Conversation State Transitions
The following tables show the conversation states in which each APPC verb can be issued, and the state change that occurs on completion of the verb. In some cases, the state change depends on the primary_rc parameter returned to the verb; where this applies, the applicable primary_rc values are listed in the Return codes column.
Where no return codes are shown, the state changes are the same for all return codes (except as described in Notes 2 and 3 following the table).
- X indicates that the verb cannot be issued in this state.
- The following markers indicate the state of the conversation after the
verb has completed:
- Send
- Send Pending
- Receive
- Confirm
- Confirm Send
- Confirm Deallocate
- Pending PoSt
- ReseT
- / indicates that it is not applicable to consider the previous state. This applies to the [MC_]ALLOCATE and RECEIVE_ALLOCATE verbs; these verbs always start a new conversation as though they were in Reset state, with no effect on the conversation (if any) in which they were issued.
- A blank entry indicates that the return code shown cannot occur in this state.
For information on full-duplex conversation state transitions, see APPC Full-Duplex Conversation State Transitions.
| Verb Return Codes | T | S | SP | R | C | CS | CD | PS |
|---|---|---|---|---|---|---|---|---|
| [MC_]ALLOCATE | ||||||||
|
AP_OK |
S | / | / | / | / | / | / | / |
|
(other) |
T | |||||||
| CANCEL_CONVERSATION | X | T | T | T | T | T | T | T |
| [MC_]CONFIRM | X | |||||||
|
AP_OK |
S | S | X | X | X | X | X | |
|
AP_ERROR |
R | R | ||||||
| [MC_]CONFIRMED | X | X | X | X | R | S | T | X |
| [MC_]DEALLOCATE (Abend) | X | T | T | T | T | T | T | T |
| [MC_]DEALLOCATE (Other) | ||||||||
|
AP_ERROR |
X | R | R | X | X | X | X | X |
|
(other) |
T | T | ||||||
| [MC_]FLUSH | X | S | S | X | X | X | X | X |
| [MC_]GET_ATTRIBUTES | X | S | SP | R | C | CS | CD | P |
| GET_STATE | X | S | SP | R | C | CS | CD | P |
| GET_TYPE | X | S | SP | R | C | CS | CD | P |
| [MC_]PREPARE_TO_ RECEIVE | X | R | R | X | X | X | X | X |
| RECEIVE_ALLOCATE | R | |||||||
|
AP_OK |
T | / | / | / | / | / | / | / |
|
(other) |
||||||||
| [MC_]RECEIVE_AND_POST
(Note 4) |
X | P | P | P | X | X | X | X |
| [MC_]RECEIVE_AND_WAIT | X | Note 5 | Note 5 | Note 5 | X | X | X | X |
| [MC_]RECEIVE_IMMEDIATE | X | X | X | Note 5 | X | X | X | X |
| [MC_]REQUEST_TO_SEND | X | X | X | R | C | X | X | P |
| [MC_]SEND_DATA | X | |||||||
|
AP_OK |
S | S | X | X | X | X | X | |
|
AP_ERROR |
R | |||||||
| [MC_]SEND_ERROR | X | |||||||
|
AP_OK |
S | S | S | S | S | S | S | |
|
AP_ERROR |
R | |||||||
| [MC_]TEST_RTS | X | S | S | R | C | C | C | P |
- In the Return codes column of the table, the abbreviation AP_ERROR is
used for the following return codes:
- AP_PROG_ERROR_TRUNC
- AP_PROG_ERROR_NO_TRUNC
- AP_PROG_ERROR_PURGING
- AP_SVC_ERROR_TRUNC
- AP_SVC_ERROR_NO_TRUNC
- AP_SVC_ERROR_PURGING.
- The conversation will always enter Reset state if any of the following
return codes are received:
- AP_ALLOCATION_ERROR
- AP_COMM_SUBSYSTEM_ABENDED
- AP_COMM_SUBSYSTEM_NOT_LOADED
- AP_CONV_FAILURE_RETRY
- AP_CONV_FAILURE_NO_RETRY
- AP_DEALLOC_ABEND
- AP_DEALLOC_ABEND_PROG
- AP_DEALLOC_ABEND_SVC
- AP_DEALLOC_ABEND_TIMER
- AP_DEALLOC_NORMAL
- The following non-OK return codes do not cause any state change. The conversation
always remains in the state in which the verb was issued:
- AP_CONVERSATION_TYPE_MIXED
- AP_PARAMETER_CHECK
- AP_STATE_CHECK
- AP_TP_BUSY
- AP_UNEXPECTED_SYSTEM_ERROR
- AP_UNSUCCESSFUL
- After [MC_]RECEIVE_AND_POST has been issued and received the initial primary_rc of AP_OK, the conversation changes to Pending Post state. Once the supplied callback routine has been called to indicate that the verb has completed, the new conversation state depends on the primary_rc and what_rcvd parameters as in Note 5.
- The state change after one of the RECEIVE verbs
depends on both the primary_rc and what_rcvd parameters.
If the primary_rc parameter is AP_PROG_ERROR*, AP_SVC_ERROR*, or ([MC_]RECEIVE_IMMEDIATE only) AP_UNSUCCESSFUL, the new state is RECEIVE.
If the primary_rc parameter is AP_DEALLOC*, the new state is RESET.
If the primary_rc parameter is AP_OK, the new state depends on the value of the what_rcvd parameter:- Receive state
- AP_DATA, AP_DATA_COMPLETE, AP_DATA_INCOMPLETE
- Send state
- AP_SEND
- Send Pending state
- AP_DATA_SEND, AP_DATA_COMPLETE_SEND
- Confirm state
- AP_CONFIRM_WHAT_RECEIVED, AP_DATA_CONFIRM, AP_DATA_COMPLETE_CONFIRM
- Confirm Send state
- AP_CONFIRM_SEND, AP_DATA_CONFIRM_SEND, AP_DATA_COMPLETE_CONFIRM_SEND
- Confirm Deallocate state
- AP_CONFIRM_DEALLOCATE, AP_DATA_CONFIRM_DEALLOCATE, AP_DATA_COMPLETE_CONFIRM_DEALL
For information on half-duplex conversation state transitions, see APPC Half-Duplex Conversation State Transitions.
| Verb Return Codes | T | SR | S | R |
|---|---|---|---|---|
| [MC_]ALLOCATE | ||||
|
AP_OK |
SR | / | / | / |
|
(other) |
T | |||
| CANCEL_CONVERSATION | X | T | T | T |
| [MC_]DEALLOCATE (Abend) | X | T | T | T |
| [MC_]DEALLOCATE (Flush) | X | R | T | X |
| [MC_]FLUSH | X | SR | S | X |
| [MC_]GET_ATTRIBUTES | X | SR | S | R |
| GET_STATE | X | SR | S | R |
| GET_TYPE | X | SR | S | R |
| RECEIVE_ALLOCATE | ||||
|
AP_OK |
SR | / | / | / |
|
(other) |
T | |||
| [MC_]RECEIVE_AND WAIT | ||||
|
AP_OK |
X | SR | X | R |
|
AP_ERROR |
X | SR | X | R |
|
AP_DEALLOC_NORMAL |
X | S | X | T |
| RECEIVE_EXPEDITED_DATA | X | SR | S | R |
| [MC_]RECEIVE_ IMMEDIATE | ||||
|
AP_OK |
X | SR | X | R |
|
AP_ERROR |
X | SR | X | R |
|
AP_DEALLOC_NORMAL |
X | S | X | T |
| [MC_]SEND_DATA | ||||
|
AP_OK |
X | SR | S | X |
|
AP_ERROR_INDICATION |
X | SR | T | X |
| [MC_]SEND_ERROR | ||||
|
AP_OK |
X | SR | S | X |
|
AP_ERROR_INDICATION |
X | SR | T | X |
- In the Return codes column of the table, the abbreviation AP_ERROR is
used for the following return codes:
- AP_PROG_ERROR_TRUNC
- AP_PROG_ERROR_NO_TRUNC
- AP_SVC_ERROR_TRUNC
- AP_SVC_ERROR_NO_TRUNC
- The conversation will always enter Reset state if any of the following
return codes are received:
- AP_ALLOCATION_ERROR
- AP_COMM_SUBSYSTEM_ABENDED
- AP_COMM_SUBSYSTEM_NOT_LOADED
- AP_CONV_FAILURE_RETRY
- AP_CONV_FAILURE_NO_RETRY
- AP_DEALLOC_ABEND
- AP_DEALLOC_ABEND_PROG
- AP_DEALLOC_ABEND_SVC
- AP_DEALLOC_ABEND_TIMER
- The following non-OK return codes do not cause any state change. The conversation
always remains in the state in which the verb was issued:
- AP_CONVERSATION_TYPE_MIXED
- AP_PARAMETER_CHECK
- AP_STATE_CHECK
- AP_TP_BUSY
- AP_UNEXPECTED_SYSTEM_ERROR
- AP_UNSUCCESSFUL