3.3.4 MCF receive message files

A logical message can contain one or more segments. A segment consists of a header part containing the segment information and a data part which is the message text.

[Figure]

There are five types of segments:

Specify the segment type in the header part.

Organization of this subsection
(1) Asynchronous receive message file
(2) Synchronous receive message file

(1) Asynchronous receive message file

An asynchronous receive message file stores the messages received by the UAP in an MCF function (dc_mcf_receive function). Create one logical message per file. When a header segment is used, the data is prefixed to the message.

(a) File structure
Logical message consisting of one segment only

[Figure]

Logical message consisting of multiple segments

[Figure]

Header segment

[Figure]

(b) File contents
ItemPositionLength (bytes)Contents
HeaderInput/output logical terminal name09Logical terminal name (including final null character) to be passed to MCF functions. Specify the same name for each segment of a multiple-segment message.
Map name99Map name (including final null character). Specify the same name for each segment of a multiple-segment message.
This specification is valid only for functions that return a map name.
Reserved189Null character
Segment type271One of the following characters:
F
First segment
M
Middle segment
L
Last segment
O
Single segment
H
Header segment
Message length284Message length (0-2147483647​)
DataMessage32nThe data in the segment, of the specified message length
(c) Notes
Asynchronous receive message file containing segments other than header segments

When segment type L or O is specified for a message, the MHP regards the message as completed and ignores any subsequent segments.

Segment typeSegments received by MHP
First segmentMiddle segmentLast segment
FMLF, M, L
FLXF, L#1
LXXL#2
XMLNo segments received.#3
FXL
Legend:
X: Specification other than F, M, L, or O.
#1: At the third receive request, the MHP assumes that one logical message has been received and an error code is returned.
#2: The middle and subsequent segments are ignored.
#3: A message reports that the segment type is invalid and the receive request function returns an error code.

Asynchronous receive message file containing a header segment

Only the first segments in the file are valid.

Segment typeSegments received by MHP
HH#1
H + X
XNo segments received.#2
X + H
Legend:
X: Specification other than H.
#1: However, the segment is passed in concatenated format with F, M, L, or O.
#2: A message reports that the segment type is invalid and the receive request function returns an error code.

(2) Synchronous receive message file

A synchronous receive message file stores the synchronous messages received by the UAP via MCF functions (dc_mcf_recvsync and dc_mcf_sendrecv functions). A single file can contain a number of logical messages. When a header segment is used, the data is prefixed to the message.

(a) File structure
Logical message consisting of one segment only

[Figure]

Logical message consisting of multiple segments

[Figure]

Header segment

[Figure]

(b) File contents
ItemPositionLength (bytes)Contents
HeaderInput/output logical terminal name09Logical terminal name (including final null character) to be passed to MCF functions. Specify the same name for each segment of a multiple-segment logical message.
Map name99Map name (including final null character). Specify the same name for each segment of a multiple-segment message.
This specification is valid only for functions that return a map name.
Reserved189Null character
Segment type271One of the following characters:
F
First segment
M
Middle segment
L
Last segment
O
Single segment
H
Header segment
Message length284Message length (0-2147483647​)
DataMessage32nThe data in the segment, of the specified message length
(c) Notes
Synchronous receive message file containing segments other than header segments

When segment type L or O is specified for a message, the MHP regards the message as completed and ignores any subsequent segments.

Segment typeSegments received by MHP
First segmentMiddle segmentLast segment
FML(F, M, L)
MML(M, M, L)
OOO(O), (O), (O)
FLM(F, L), (M)
XMLNo segments received.#
FXL
Legend:
X: Specification other than F, M, L, or O.
( ): One logical message
#: A message reports that the segment type is invalid and the receive request function returns an error code.
Synchronous receive message file containing a header segment

All the header segments in the file are valid.

Segment typeSegments received by MHP
HH#1
H + HH, H#1
H + XNo segments received.#2
X
X + H
Legend:
X: Specification other than H.
#1: However, the segment is passed in concatenated format with F, M, L, or O.
#2: A message reports that the segment type is invalid and the receive request function returns an error code.