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 in column 1 down the left side 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.
A number at an intersection indicates the state number of the next state. Other symbols represent other conditions, as follows:
Command issued | EIB flag returned | ALLO- CATED41 | SEND | PEND- RECEIVE | PEND- FREE | RECEIVE | CONF- RECEIVE |
---|---|---|---|---|---|---|---|
State 1 | State 2 | State 3 | State 4 | State 5 | State 6 | ||
BUILD ATTACH | × | = | = | = | = | = | N/A |
EXTRACT ATTACH | × | = | = | = | = | = | N/A |
SEND INVITE WAIT | × | 5 | 5 | Ab | Ab | Ab | N/A |
SEND INVITE | × | 3 | 3 | Ab | Ab | Ab | N/A |
SEND LAST WAIT | × | 12 | 12 | Ab | Ab | Ab | N/A |
SEND LAST | × | 4 | 4 | Ab | Ab | Ab | N/A |
SEND | × | = | = | Ab | Ab | Ab | N/A |
RECEIVE | EIBSYNC + EIBFREE | Ab | 11 | 11 | Ab | 11 | N/A |
RECEIVE | EIBSYNC + EIBRECV | Ab | 9 | 9 | Ab | 9 | N/A |
RECEIVE | EIBSYNC | Ab | 10 | 10 | Ab | 10 | N/A |
RECEIVE | EIBFREE | Ab | 12 | 12 | Ab | 12 | N/A |
RECEIVE | EIBRECV | Ab | 5 | 5 | Ab | = | N/A |
RECEIVE NOTRUNCATE42 | EIBCOMPL42 | Ab | 5 | 5 | Ab | = | N/A |
RECEIVE | × | Ab | 2 | 2 | Ab | 2 | N/A |
CONVERSE43 | EIB flags and states as for RECEIVE but allowed in send state | ||||||
ISSUE SIGNAL44 | × | Ab | = | = | = | = | N/A |
WAIT SIGNAL | × | Ab | = | = | = | = | N/A |
SYNCPOINT45 | × | = | = | 5 | 12 | Ab | N/A |
WAIT TERMINAL | × | = | = | 5 | 12 | = | N/A |
FREE | × | End46 | End46 | Ab | 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 | Ab | Ab | Ab | Ab | N/A | After data and CD flows |
N/A | N/A | Ab | Ab | Ab | Ab | N/A | After data buffered |
N/A | N/A | Ab | Ab | Ab | Ab | N/A | After data and EB flows |
N/A | N/A | Ab | Ab | Ab | Ab | N/A | After data buffered |
N/A | N/A | Ab | Ab | Ab | Ab | N/A | After data buffered |
N/A | N/A | Ab | Ab | Ab | Ab | N/A |
After sync flow detected |
N/A | N/A | Ab | Ab | Ab | Ab | N/A |
After sync flow detected |
N/A | N/A | Ab | Ab | Ab | Ab | N/A | After sync flow detected |
N/A | N/A | Ab | Ab | Ab | Ab | N/A | After EB detected |
N/A | N/A | Ab | Ab | Ab | Ab | N/A | When data available |
N/A | N/A | Ab | Ab | Ab | Ab | N/A | When data available |
N/A | N/A | Ab | Ab | Ab | Ab | N/A | When data available |
States as for RECEIVE | When data available | ||||||
N/A | N/A | = | = | = | Ab | N/A | Immediately |
N/A | N/A | = | = | = | Ab | N/A | After response from partner |
N/A | N/A | 5 | 2 | 12 | = | N/A | After response from partner |
N/A | N/A | Ab | Ab | Ab | Ab | N/A | Immediately |
N/A | N/A | Ab | Ab | Ab | End | N/A | Immediately |
A front-end transaction can be initiated either from a transaction or by automatic transaction initiation (ATI).
A terminal-initiated front-end transaction must issue an ALLOCATE command to acquire a session. If the session is successfully allocated, the front-end transaction’s side of the conversation goes into allocated state (state 1).
A front-end transaction started by ATI in the local system, with an LUTYPE6.1 session as its principal facility, already has a session allocated. Such a transaction does not issue an ALLOCATE command, and its side of the conversation starts in send state (state 2).
A back-end transaction is initially in receive state (state 5).
There is no way for an application to check the conversation state directly. The application must instead check RESP and the EIB fields after each command, and must follow the rules shown in the state table.
You select the partner transaction program by issuing a SEND command or a CONVERSE command. You have the choice of identifying the transaction program either in the first four bytes of the user data or in the attach function management header built by the BUILD ATTACH command.
The back-end transaction starts in receive state.
SEND INVITE WAIT [FROM]
RECEIVE
SEND LAST WAIT
FREE