OpenTP1 Version 7 Programming Guide

[Contents][Index][Back][Next]

3.6.3 Receiving messages

When the MCF finishes receiving the last segment of a message from another system, it passes the message to the MHP identified by the application name. The MHP calls the function dc_mcf_receive() [CBLDCMCF('RECEIVE ')] to receive the message and starts processing. This message reception is called asynchronous message reception.

The function dc_mcf_receive() receives one segment of a message at one time.

If the message consists of one segment (single-segment message), the function dc_mcf_receive() is called only once.

If the message consists of more than one segment, the function dc_mcf_receive() is called as many times as the segments. The MHP receives the message, beginning with the first segment and proceeding to intermediate segments. After receiving intermediate segments, the MCF finally receives a return value indicating that there is no more segment to be received. It then recognizes that it has received the entire message, including the last segment.

User exit routines can be used to edit messages to be passed to the MHP and to change the application name.

Application name:
An application name is expressed with alphanumeric characters comprising 1 to 8 bytes (from the beginning of the message to the byte followed by a space). If there is no space up to the ninth byte or the application name begins with a space, the specified application name is treated as invalid.
Application names can be edited by using the user exit routine that edits input message.

The figure below shows the receiving of a message.

Figure 3-8 Message receiving

[Figure]