11.2.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.

An MCF receive message file stores the messages received by the UAP in an MCF function (dc_mcf_receive, dc_mcf_recvsync, or dc_mcf_sendrecv). Create one logical message per file. Two messages can be concatenated if a header segment is used.

Organization of this subsection
(1) File structure
(2) File contents
(3) Notes

(1) File structure

Logical message consisting of one segment only

[Figure]

Logical message consisting of multiple segments

[Figure]

Header segment

[Figure]

(2) File contents

ItemPositionLength (bytes)Contents
HeaderInput/output logical terminal name09Logical terminal name (including final null character) to be passed in 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

(3) Notes

Logical message consisting of one segment only

When segment type F, M, or L is specified, the message is handled in the same way as when O is specified and no error occurs.

Segment typeFile type
FHandled as an MCF receive message file.
M
L
O
H, #Handled as an invalid file specification.
The system makes a file name inquiry.
Legend:
#: Specification other than F, M, L, O, or H.

Logical message consisting of multiple segments

When segment type L, H, or O is specified, the MHP regards the message as completed and ignores any subsequent segments. Segment type F is handled in the same way as segment type M.

Segment typeSegments received by MHP
First segmentMiddle segmentLast segment
FMLF, M, L
FLMF, L#1
FOLF, L#2
MMLM, M, L
LMFL#3
OOOO#3
FLMF, L#1
FMHNo segments received.#4
XML
FXL
FMX
HFLH#3
HOOH#3
Legend:
X: Specification other than F, M, or L.
#1: M is ignored.
#2: L is ignored.
#3: The middle and subsequent segments are ignored.
#4: Handled as an invalid file specification. The system makes a file name inquiry.

Files concatenated by header segment

Files can only be concatenated when H is specified as the segment type. Otherwise, the file specifications are ignored.

Segment type (combinations for concatenation)File type
H + (file beginning with F)Handled as a concatenated MCF receive message file.
H + (file beginning with M)
H + (file beginning with L)
H + (file beginning with O)
H + (file beginning with #)
F, M, L, or O + (file beginning with any segment type)The file following + is ignored.
# + (file beginning with any segment type)Handled as an invalid file specification. The system makes a file name inquiry.
Legend:
#: Specification other than F, M, L, O, or H.

Do not use a plus sign (+), space, or tab code in the file name. Also, do not use ps or end as the file name.