RECEIVE function
This function must be able to handle receipt of the following:
- Application data
- FMH7s and ER1s (negative responses)
- PS_headers (Prepares, Request_commits)
- Indicators such as CD, CEB, and RQD2
- Signal.
Figure 1 gives an overview
of the modules involved with the processing of receive requests. These
modules are described in CICS executable modules.
Figure 1. Distributed transaction
processing of LU6.2 receive requests

DFHZARL passes the DFHLUC parameter list, specifying the type of receive required, to DFHZARR.
DFHZARR then performs the following actions:
- Checks that request is valid; if not, returns error codes.
- Initializes the application and LU6.2 receive buffers (by calls to DFHZARRA and the DFHZARR0 subroutine of DFHZARR respectively).
- Calls DFHZARRC to determine what to process next.
- Depending on DFHZARRC’s response, calls the relevant subroutine.
- If “enough” (or all that can be) has not been received, loops back to step 3; otherwise step 6.
- Tests for (and returns) signal when it has been received.
The results of the receive are passed back to the caller in the DFHLUC parameter list.
To control this processing, DFHZARR uses the variables receive_type and what_next, as follows.
receive_type can have the following values:
- RECEIVE_WAIT
- Request was a receive and wait.
- RECEIVE_IMMEDIATE
- Request was a receive immediate.
- LOOK_AHEAD
- All the allowed user data has been received, but only one receive immediate call to the DFHZARR1 subroutine of DFHZARR is permitted to attempt to pick up indicators such as CD, CEB, or a PS_header.
- NO_MORE_RECEIVES
- No more calls to DFHZARR1 are permitted, but processing may continue with what has already been received.
- NO_RECEIVE_LOOK_AHEAD
- All the allowed user data has been received. An attempt must be made to pick up indicators such as CD, CEB, or a PS_header without a call to DFHZARR1. This value is only required for a receive immediate request.
- RECEIVE_COMPLETE
- Receive processing is finished.
The first two values are possible initial values of receive_type, and the other four are used as the receive progresses.
what_next is an output of DFHZARRC, and represents what
is next to be processed. It can have the following values:
- DATA_RECORD
- Application data
- FMH_RECORD
- FMH7 in the buffer
- PS_HEADER_RECORD
- Prepare or Request_commit
- PARTIAL_LL
- First byte of a logical record only, therefore cannot tell whether it is a DATA_RECORD or PS_HEADER_RECORD
- CD
- Change Direction
- CEB
- Conditional End Bracket
- RQD2
- RQD2 without CD or CEB
- RQD2_CD
- RQD2 with CD
- RQD2_CEB
- RQD2 with CEB
- ER1
- Negative response
- EMPTY_BUFFER
- Nothing available to receive.