The state table for MRO conversations

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.

How to use the state table

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:

Symbol Meaning
N/A Cannot occur.
× The EIB flag is any one that has not been covered in earlier rows, or it is irrelevant.
Ab The command is not valid in this state. Issuing a command in a state in which it is not valid usually causes an AZI1 abend.
= Remains in current state.
End End of conversation.
Table 23. MRO conversation states, part 1
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
Table 24. MRO conversation states, part 2
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

Initial states

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).

Testing the conversation state

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.

Table 25. The conversation states
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

22.
The option WAIT on the SEND command does not flush data on MRO conversations. But it may affect the move to the next state.
23.
RECEIVE NOTRUNCATE returns a zero value in EIBCOMPL to indicate that the user buffer was too small to contain all the data received from the partner transaction. Normally, you would continue to issue RECEIVE NOTRUNCATE commands until the last section of data is passed to you, which is indicated by EIBCOMPL = X'FF'. If NOTRUNCATE is not specified, and the data area specified by the RECEIVE command is too small to contain all the data received, CICS® truncates the data and sets the LENGERR condition.
24.
Equivalent to:
    SEND INVITE [FROM]
    RECEIVE
25.
The commands SYNCPOINT and SYNCPOINT ROLLBACK do not relate to any particular conversation, but are propagated on all the conversations that are currently active for the task, including APPC conversations.
26.
The state of each conversation after rollback depends on several factors: Always use the EXTRACT ATTRIBUTES STATE command or the STATE option on the EXEC CICS commands to determine the conversation state.
27.
This causes an ASP1 abend, not AZI1.
28.
Equivalent to:
    SEND LAST WAIT
    FREE

[[ Contents Previous Page | Next Page Index ]]