Switching from sending to receiving data

To switch from sending to receiving, use a SEND INVITE command with or without the WAIT option.

The state table in State transitions in MRO conversations shows that after both SEND INVITE and SEND INVITE WAIT, the conversation switches the current state to receive state (state 5).

An example of a SEND INVITE command can be seen in Figure 1.
Figure 1. Checking the outcome of a SEND INVITE command
 * ...
DATA DIVISION.
WORKING-STORAGE SECTION.
* ...
01 FILLER.
02 WS-RESP PIC S9(8) COMP.
02 WS-STATE PIC S9(8) COMP.
* ...
PROCEDURE DIVISION.
* ...
* Check return code from SEND INVITE
IF WS-RESP = DFHRESP(NORMAL)
THEN
* ... Request successful, check state
IF WS-STATE = DFHVALUE(RECEIVE)
THEN
* ... SEND OK, continue processing
ELSE
* ... Logic error, should never happen
END-IF
ELSE
* ... Examine EIBRCODE for source of error
END-IF.
* ...


dfhp6c0040.html | Timestamp icon Last updated: Monday, 5 June 2017