Checking the outcome of a DTP command

Checking the response from a DTP command can be separated into three stages:

  1. Testing for request failure
  2. Testing for indicators received on the conversation
  3. Testing the conversation state.

Testing for request failure is the same as for other EXEC CICS® commands in that conditions are raised and may be handled using HANDLE CONDITION or RESP. EIBRCODE will also contain an error code.

If the request has not failed, it is possible to test for indicators received on the conversation. These are returned to the application in the EIB. The following EIB fields are relevant to all MRO DTP commands. (See the CICS Application Programming Reference for programming information on the contents and format of EIB fields.)

EIBFREE
when set to X'FF' indicates that the partner transaction has ended the conversation. It should be tested in conjunction with EIBSYNC to determine exactly how to end the conversation.
EIBSYNC
when set to X'FF' indicates the partner transaction has requested a syncpoint.
EIBSYNRB
when set to X'FF' indicates the partner transaction has issued a SYNCPOINT ROLLBACK command.

Table 21 shows how these EIB fields interact.

Table 21. Interaction of some EIB fields
EIB- FREE EIB- SYNRB EIB- SYNC Description
X'00' X'FF' X'00' The partner transaction or system has issued SYNCPOINT ROLLBACK.
X'FF' X'00' X'00' The partner transaction or system has issued SEND LAST followed by a FREE command.
X'FF' X'00' X'FF' The partner transaction or system has issued SEND LAST followed by SYNCPOINT. The local program should reply with a SYNCPOINT command followed by a FREE command.
X'00' X'00' X'FF' The partner transaction or system has issued a SYNCPOINT.

In addition the following EIB fields are relevant only to the RECEIVE and CONVERSE commands:

EIBATT
when set to X'FF' indicates that the data received contained an attach header. The attach header is not passed to the application; however, EIBATT indicates that an EXTRACT ATTACH command is appropriate.
EIBCOMPL
when set to X'FF' indicates that all the data sent at one time has been received. This field is used in conjunction with the RECEIVE NOTRUNCATE command.
EIBFMH
when set to X'FF' indicates that the data passed to the application contains a concatenated Function Management Header (FMH). This happens only when the partner CICS transaction builds an FMH in the data and the FMH option on the SEND command is specified.
EIBRECV
when set to X'00' indicates the partner transaction used the INVITE or LAST option on its last SEND command. When set on (X'FF'), EIBRECV indicates that another RECEIVE is required.

After the EIB fields have been analyzed, it is possible to test the conversation state to determine which DTP commands may be issued next. See State transitions in MRO conversations.

Note:
CICS ignores the profile you specify on the PROFILE option of the ALLOCATE for an MRO link and instead uses the default profile. This enables FMHs to be sent and received and EIBATT or EIBFMH to be set appropriately. The default profile DFHCICSA, used for the session allocated by the front-end transaction, has INBFMH (ALL) specified. The default principal facility profile DFHCICST used for the back-end transaction does not have INBFMH (ALL) specified.

Checking EIB fields and the conversation state

Most of the information supplied by the EIB indicator fields can be obtained from the conversation state. However, there are some EIB fields that you cannot ignore. For example, when the conversation remains in receive state (state 5) after a RECEIVE command has been issued, only EIBFMH indicates that the partner transaction has sent an FMH.

Note that the state table provided in State transitions in MRO conversations contains not only states and commands issued, but also relevant EIB fields settings. The order in which the EIB fields are shown provides a sensible sequence for checking them in an application.

[[ Contents Previous Page | Next Page Index ]]