The state table provides the following information for writing a DTP program. Firstly, it shows which commands can be issued from each conversation state. Secondly, it shows the results of issuing a command in terms of state transactions and EIB fields.
The commands you can issue, coupled with the EIB flags that can be set after execution, are shown down the left side of the table. These commands correspond to the rows of the table. The possible conversation states are shown across the top of the table. The states correspond to the columns of the table. The intersection of row (command and EIB flag) and column (state) represents the state transition, if any, that occurs when that command returning a particular EIB flag is issued in that state. The order in which EIB flags are shown with a command is the order in which you should test the EIB flags in your program.
A number at an intersection indicates the state number of the next state. Other symbols represent other conditions, as follows:
Command issued | EIB flag returned4 | ALLO- CATED5 | SEND | PEND- RECEIVE | PEND- FREE | RECEIVE | CONF- RECEIVE |
---|---|---|---|---|---|---|---|
State 1 | State 2 | State 3 | State 4 | State 5 | State 6 | ||
BUILD ATTACH | × | = | = | N/A | = | Ab | N/A |
EXTRACT ATTACH | × | = | = | N/A | = | = | N/A |
EXTRACT ATTRIBUTES | × | = | = | N/A | = | = | N/A |
SEND INVITE WAIT22 | × | 5 | 5 | N/A | Ab | Ab | N/A |
SEND INVITE | × | 5 | 5 | N/A | Ab | Ab | N/A |
SEND LAST WAIT22 | × | 12 | 12 | N/A | Ab | Ab | N/A |
SEND LAST | × | 4 | 4 | N/A | Ab | Ab | N/A |
SEND | × | 2 | = | N/A | Ab | Ab | N/A |
RECEIVE |
EIBSYNC + EIBFREE + EIBCOMPL |
Ab | Ab | N/A | Ab | 11 | N/A |
RECEIVE |
EIBSYNC + EIBRECV + EIBCOMPL |
Ab | Ab | N/A | Ab | 9 | N/A |
RECEIVE |
EIBSYNRB + EIBCOMPL |
Ab | Ab | N/A | Ab | 13 | N/A |
RECEIVE | EIBFREE | Ab | Ab | N/A | Ab | 12 | N/A |
RECEIVE | EIBRECV | Ab | Ab | N/A | Ab | = | N/A |
RECEIVE NOTRUNCATE23 | EIBCOMPL23 | Ab | Ab | N/A | Ab | = | N/A |
RECEIVE | × | Ab | Ab | N/A | Ab | 2 | N/A |
CONVERSE24 | EIB flags and states as for RECEIVE but allowed in send state | ||||||
SYNCPOINT25 | EIBRLDBK | = | 2 or 526 | N/A | 2 or 526 | Ab27 | N/A |
SYNCPOINT25 | × | = | = | N/A | 12 | Ab27 | N/A |
SYNCPOINT ROLLBACK25 | × | = | 2 or 526 | N/A | 2 or 526 | 2 or 526 | N/A |
FREE | × | End28 | End28 | N/A | End | Ab | N/A |
CONF- SEND | CONF- FREE | SYNC- RECEIVE | SYNC- SEND | SYNC- FREE | FREE | ROLL- BACK | Command returns |
---|---|---|---|---|---|---|---|
State 7 | State 8 | State 9 | State 10 | State 11 | State 12 | State 13 | |
N/A | N/A | = | N/A | = | = | = | Immediately |
N/A | N/A | = | N/A | = | = | = | Immediately |
N/A | N/A | = | N/A | = | = | = | Immediately |
N/A | N/A | Ab | N/A | Ab | Ab | Ab | After data and CD flows |
N/A | N/A | Ab | N/A | Ab | Ab | Ab | After data and CD flows |
N/A | N/A | Ab | N/A | Ab | Ab | Ab | After data and EB flows |
N/A | N/A | Ab | N/A | Ab | Ab | Ab | After data flows |
N/A | N/A | Ab | N/A | Ab | Ab | Ab | After data flows |
N/A | N/A | Ab | N/A | Ab | Ab | Ab |
After sync flow detected |
N/A | N/A | Ab | N/A | Ab | Ab | Ab |
After sync flow detected |
N/A | N/A | Ab | N/A | Ab | Ab | Ab |
After rollback flow detected |
N/A | N/A | Ab | N/A | Ab | Ab | Ab | After EB detected |
N/A | N/A | Ab | N/A | Ab | Ab | Ab | When data available |
N/A | N/A | Ab | N/A | Ab | Ab | Ab | When data available |
N/A | N/A | Ab | N/A | Ab | Ab | Ab | When data available |
States as for RECEIVE | When data available | ||||||
N/A | N/A | 2 or 526 | N/A | 2 or 526 | = | Ab | After response from partner |
N/A | N/A | 5 | N/A | 12 | = | Ab | After response from partner |
N/A | N/A | 2 or 526 | N/A | 2 or 526 | = | 2 or 526 | After rollback across UOW |
N/A | N/A | Ab | N/A | Ab | End | Ab | Immediately |
A front-end transaction in a conversation must issue an ALLOCATE command to acquire a session. If the session is successfully allocated, the front end’s side of the conversation goes into allocated state (state 1).
A back-end transaction is initially in receive state (state 5).
There are two ways for an application to inquire on the current conversation state. The first is to use the EXEC CICS EXTRACT ATTRIBUTES STATE command and the second is to use the STATE parameter on the DTP commands. In both cases the current state is returned to the application in a CICS-value data area (cvda). Table 25 shows how the cvda codes relate to the conversation state. It also shows the symbolic names defined for the cvda values.
States used in this book | States used in DTP programs | ||
---|---|---|---|
State name | State number | Symbolic name | cvda code |
Allocated | 1 | DFHVALUE(ALLOCATED) | 81 |
Send | 2 | DFHVALUE(SEND) | 90 |
Pendfree | 4 | DFHVALUE(PENDFREE) | 86 |
Receive | 5 | DFHVALUE(RECEIVE) | 88 |
Syncreceive | 9 | DFHVALUE(SYNCRECEIVE) | 92 |
Syncfree | 11 | DFHVALUE(SYNCFREE) | 91 |
Free | 12 | DFHVALUE(FREE) | 85 |
Rollback | 13 | DFHVALUE(ROLLBACK) | 89 |
SEND INVITE [FROM]
RECEIVE
SEND LAST WAIT
FREE