State tables for APPC mapped conversations at sync level 2
Tables showing the state transitions that occur when transactions engage in APPC mapped conversations at sync level 2, under the EXEC CICS® API.
The GDS ISSUE SIGNAL command and the CDBSIG flag
In the tables, the CDBSIG flag is not mentioned. This is because its use is optional and is entirely a matter of agreement between the two conversation partners. In the worst case, it can occur at any time after every command that affects the CDB flags. However, used for the purpose for which it was intended, it usually occurs after a GDS SEND command. Its priority in the order of testing depends on the role you give it in the application.
The CDBSIG flag is set when the partner issues the GDS ISSUE SIGNAL command.
State changes for the SYNCPOINT and SYNCPOINT ROLLBACK commands
When the SYNCPOINT and SYNCPOINT ROLLBACK commands are issued, they are propagated on, and affect the state of, all the conversations that are currently active for the task, including MRO conversations.
Following rollback, the conversation can be in SEND or RECEIVE state, depending on the conversation state at the start of the current distributed unit of work. The conversation can be in FREE state if it ended abnormally due to session failure or due to deallocate abend being received, or if the partner transaction issued a SEND LAST WAIT or FREE command.
After a syncpoint or rollback, it is advisable to determine the conversation state before issuing any further commands against the conversation.
State changes following the ISSUE PREPARE command
Although ISSUE PREPARE can return with the conversation in either SYNCSEND state, SYNCRECEIVE state, or SYNCFREE state, the only commands allowed on that conversation following an ISSUE PREPARE are SYNCPOINT and SYNCPOINT ROLLBACK. All other commands abend.
State tables
| Command issued | CDB flag returned | Command returns | ALLO- CATED | SEND | PEND- RECEIVE | PEND- FREE | RECEIVE | CONF- RECEIVE |
|---|---|---|---|---|---|---|---|---|
| State 1 | State 2 | State 3 | State 4 | State 5 | State 6 | |||
| GDS CONNECT PROCESS | EIBERR + EIBFREE | Immediately | 12 | Abend | Abend | Abend | Abend | Abend |
| GDS CONNECT PROCESS | × | Immediately | 2 | Abend | Abend | Abend | Abend | Abend |
| GDS EXTRACT PROCESS (back-end transaction only) | × | Immediately | = | = | = | = | = | = |
| GDS EXTRACT ATTRIBUTES | × | Immediately | = | = | = | = | = | = |
| GDS SEND (any valid form) | CDBERR + CDBFREE | After error flow detected | Abend | 12 | Abend | 12 | Abend | Abend |
| GDS SEND (any valid form) | CDBERR | After error flow detected | Abend | 5 | Abend | 12 | Abend | Abend |
| GDS SEND INVITE WAIT | × | After data flows | Abend | 5 | Abend | Abend | Abend | Abend |
| GDS SEND INVITE CONFIRM | × | After response from partner | Abend | 5 | Abend | Abend | Abend | Abend |
| GDS SEND INVITE | × | After data buffered | Abend | 3 | Abend | Abend | Abend | Abend |
| GDS SEND LAST WAIT | × | After data flows | Abend | 12 | Abend | Abend | Abend | Abend |
| GDS SEND LAST CONFIRM | × | After response from partner | Abend | 12 | Abend | Abend | Abend | Abend |
| GDS SEND LAST | × | After data buffered | Abend | 4 | Abend | Abend | Abend | Abend |
| GDS SEND WAIT | × | After data flows | Abend | = | Abend | Abend | Abend | Abend |
| GDS SEND CONFIRM | × | After response from partner | Abend | = | 5 | 12 | Abend | Abend |
| GDS SEND | × | After data buffered | Abend | = | Abend | Abend | Abend | Abend |
| GDS RECEIVE | CDBERR + CDBSYNRB | After rollback flow detected | Abend | Abend | Abend | Abend | 13 | Abend |
| GDS RECEIVE | CDBERR + CDBFREE | After error detected | Abend | Abend | Abend | Abend | 12 | Abend |
| GDS RECEIVE | CDBERR | After error detected | Abend | Abend | Abend | Abend | = | Abend |
| GDS RECEIVE | CDBSYNC + CDBFREE | After sync flow detected | Abend | Abend | Abend | Abend | 11 | Abend |
| GDS RECEIVE | CDBSYNC + CDBRECV | After sync flow detected | Abend | Abend | Abend | Abend | 9 | Abend |
| GDS RECEIVE | CDBSYNC | After sync flow detected | Abend | Abend | Abend | Abend | 10 | Abend |
| GDS RECEIVE | CDBCONF + CDBFREE | After confirm flow detected | Abend | Abend | Abend | Abend | 8 | Abend |
| GDS RECEIVE | CDBCONF + CDBRECV | After confirm flow detected | Abend | Abend | Abend | Abend | 6 | Abend |
| GDS RECEIVE | CDBCONF | After confirm flow detected | Abend | Abend | Abend | Abend | 7 | Abend |
| GDS RECEIVE | CDBFREE | After error flow detected | Abend | Abend | Abend | Abend | 12 | Abend |
| GDS RECEIVE | CDBRECV | When data available | Abend | Abend | Abend | Abend | = | Abend |
| GDS RECEIVE LLID | CDBCOMPL | When data available | Abend | Abend | Abend | Abend | = | Abend |
| GDS RECEIVE | × | When data available | Abend | Abend | Abend | Abend | 2 | Abend |
| GDS ISSUE CONFIRMATION | × | Immediately | Abend | Abend | Abend | Abend | Abend | 5 |
| GDS ISSUE ERROR | CDBFREE | After response from partner | Abend | 12 | 12 | Abend | 12 | 12 |
| GDS ISSUE ERROR | × | After response from partner | Abend | = | 2 | Abend | 2 | 2 |
| GDS ISSUE ABEND | × | Immediately | Abend | 12 | 12 | 12 | 12 | 12 |
| GDS ISSUE SIGNAL | × | Immediately | Abend | = | = | Abend | = | = |
| GDS ISSUE PREPARE | CDBERR + CDBSYNRB | After response from partner | Abend | 13 | 13 | 13 | Abend | Abend |
| GDS ISSUE PREPARE | CDBERR + CDBFREE | After error detected | Abend | 12 | 12 | 12 | Abend | Abend |
| GDS ISSUE PREPARE | CDBERR | After error detected | Abend | 5 | 5 | 5 | Abend | Abend |
| GDS ISSUE PREPARE | × | After response from partner | Abend | 10 | 9 | 11 | Abend | Abend |
| SYNCPOINT | EIBRLDBK | After response from partner | = | 2 or 5 | 2 or 5 | 2 or 5 | Abend | Abend |
| SYNCPOINT | × | After response from partner | = | = | 5 | 12 | Abend | Abend |
| SYNCPOINT ROLLBACK | × | After rollback across UOW | = | 2 or 5 | 2 or 5 | 2 or 5 | 2 or 5 | 2 or 5 |
| GDS WAIT | × | Immediately | Abend | = | 5 | 12 | Abend | Abend |
| GDS FREE | × | Immediately | End | Abend | Abend | End | Abend | Abend |
| Command issued | CDB flag returned | CONF- SEND | CONF- FREE | SYNC- RECEIVE | SYNC- SEND | SYNC- FREE | FREE | ROLL- BACK |
|---|---|---|---|---|---|---|---|---|
| State 7 | State 8 | State 9 | State 10 | State 11 | State 12 | State 13 | ||
| GDS CONNECT PROCESS | EIBERR + EIBFREE | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS CONNECT PROCESS | × | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS EXTRACT PROCESS (back-end transaction only) | × | = | = | = | = | = | = | = |
| GDS EXTRACT ATTRIBUTES | × | = | = | = | = | = | = | = |
| GDS SEND (any valid form) | CDBERR + CDBFREE | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS SEND (any valid form) | CDBERR | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS SEND INVITE WAIT | × | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS SEND INVITE CONFIRM | × | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS SEND INVITE | × | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS SEND LAST WAIT | × | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS SEND LAST CONFIRM | × | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS SEND LAST | × | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS SEND WAIT | × | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS SEND CONFIRM | × | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS SEND | × | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS RECEIVE | CDBERR + CDBSYNRB | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS RECEIVE | CDBERR + CDBFREE | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS RECEIVE | CDBERR | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS RECEIVE | CDBSYNC + CDBFREE | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS RECEIVE | CDBSYNC + CDBRECV | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS RECEIVE | CDBSYNC | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS RECEIVE | CDBCONF + CDBFREE | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS RECEIVE | CDBCONF + CDBRECV | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS RECEIVE | CDBCONF | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS RECEIVE | CDBFREE | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS RECEIVE | CDBRECV | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS RECEIVE LLID | CDBCOMPL | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS RECEIVE | × | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS ISSUE CONFIRMATION | × | 2 | 12 | Abend | Abend | Abend | Abend | Abend |
| GDS ISSUE ERROR | CDBFREE | 12 | 12 | 12 | 12 | 12 | Abend | Abend |
| GDS ISSUE ERROR | × | 2 | 2 | 2 | 2 | 2 | Abend | Abend |
| GDS ISSUE ABEND | × | 12 | 12 | 12 | 12 | 12 | Abend | Abend |
| GDS ISSUE SIGNAL | × | = | = | = | = | = | Abend | Abend |
| GDS ISSUE PREPARE | CDBERR + CDBSYNRB | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS ISSUE PREPARE | CDBERR + CDBFREE | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS ISSUE PREPARE | CDBERR | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS ISSUE PREPARE | × | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| SYNCPOINT | EIBRLDBK | Abend | Abend | 2 or 5 | 2 or 5 | 2 or 5 | = | Abend |
| SYNCPOINT | × | Abend | Abend | 5 | 2 | 12 | = | Abend |
| SYNCPOINT ROLLBACK | × | 2 or 5 | 2 or 5 | 2 or 5 | 2 or 5 | 2 or 5 | Abend | 2 or 5 |
| GDS WAIT | × | Abend | Abend | Abend | Abend | Abend | Abend | Abend |
| GDS FREE | × | Abend | Abend | Abend | Abend | Abend | End | Abend |