State diagrams

You can use the state diagrams to construct valid command sequences. Each diagram relates to one specific state and shows the commands that you might issue, and the tests to make, after you issue the command.

When a diagram shows more than one test, make them in the order indicated. The combination of the command issued and a particular positive test result leads to a new resultant state, shown in the final column.

The state diagrams shows tests that are significant to the state of the conversation. For other conditions that can occur, for example, INVREQ or NOTALLOC, make tests in the normal way.

Table 1. State 1: CICS-TO-IMS conversations - session not allocated
Commands you can issue What to test New state
ALLOCATE [NOQUEUE] * SYSIDERR 1
Ditto SYSBUSY * 1
Ditto Otherwise (obtain session name from EIBRSRCE) 2

If you want your program to wait until a session is available, omit the NOQUEUE option of the ALLOCATE command and do not code a HANDLE command for the SYSBUSY condition.

If you want control to be returned to your program if a session is not immediately available, either specify NOQUEUE on the ALLOCATE command and test EIBRCODE for SYSBUSY (X'D3'), or code a HANDLE CONDITION SYSBUSY command.

Table 2. State 2: CICS-TO-IMS conversations - send state
Commands you can issue * What to test New state
SEND   2
SEND INVITE 3 or 4
SEND LAST 6
CONVERSE
Equivalent to:
SEND INVITE WAIT
RECEIVE
Go to the STATE 4 table and make the tests shown for the RECEIVE command.
RECEIVE Go to the STATE 4 table and make the tests shown for the RECEIVE command.
SYNCPOINT (Transaction abends if SYNCPOINT fails.) 2
FREE
Equivalent to:
SEND LAST WAIT
FREE
1

For the front-end transaction, the first command used after the session has been allocated must be a SEND command or CONVERSE command that initiates the back-end transaction in one of the ways described under Attaching the remote transaction.

Table 3. State 3: CICS-TO-IMS conversations - receive pending after SEND INVITE
Commands you can issue What to test New state
SYNCPOINT (Transaction abends if SYNCPOINT fails.) 4
Table 4. State 4: CICS-TO-IMS conversations - receive state
Commands you can issue What to test New state
RECEIVE [NOTRUNCATE] * EIBCOMPL *
Ditto EIBSYNC 5
Ditto EIBFREE 7
Ditto EIBRECV 4
Ditto Otherwise 2

If NOTRUNCATE is specified, a zero value in EIBCOMPL indicates that the data passed to the application by CICS is incomplete (because, for example, the data area specified in the RECEIVE command is too small). CICS saves the remaining data for retrieval by later RECEIVE NOTRUNCATE commands. EIBCOMPL is set when the last part of the data is passed back. If the NOTRUNCATE option is not specified, over-length data is indicated by the LENGERR condition, and the remaining data is discarded by CICS.

Table 5. State 5: CICS-TO-IMS conversations - receiver take syncpoint
Commands you can issue What to test New state
SYNCPOINT EIBFREE (saved value) 7
Ditto EIBRECV (saved value) 4
Ditto Otherwise 2
Table 6. State 6: CICS-TO-IMS conversations - free pending after SEND LAST
Commands you can issue What to test New state
SYNCPOINT 7
FREE 1
Table 7. State 7: CICS-TO-IMS conversations - free session
Commands you can issue What to test New state
FREE 1


dfht1c00226.html | Timestamp icon Last updated: Thursday, 27 June 2019