See Section 2.15.4, "Interactive continuation or cancellation of response messages: original mode (display and record oriented) and enhanced mode (display, tabular, and event replay)," for a discussion of the continuation pointer segment and the continuation pointer field, and their use in the continuation of responses to queries and in the continuation of unsolicited update messages.
Besides the need to continue a message, there are occasional implementation conditions that force the continuation of a segment across messages. Such continued segments require the use of the ADD segment as follows:
a) the segment being continued (call it ANY for this example) is ended at an arbitrary character position and terminated with the Standard segment terminator (carriage return).
b) the following segment is the ADD segment. When it follows a segment being continued, the ADD segment contains no fields. Whether the message being continued is a response to a query, or an unsolicited update, the receiving system will use the continuation pointer (with the ADD segment) to continue the message.
c) when a response (to a query) is continued, the first segment after the QRD and QRF (on a continued query) will be the ADD segment. All the fields after the ADD segment identifier (fields 1-N) will be the continuation of the ANY segment. The receiving system will then use the continuation pointer to join the two parts of the ANY segment and continue processing the message.
d) for the continuation of an unsolicited update message, the ADD segment will be the first segment after the MSH segment. The receiving system will use the continuation pointer field in the MSH segment to identify the message being continued, and then use the ADD segment as described in c) to join the two parts of the ANY segment.
e) limitations: MSH, MSA, DSC, PID, QRD, QRF, URD and URS segments cannot be continued.
f) although the UU example given below is for a display message, there is nothing in the protocol to prevent a record-oriented UU from being continued in this fashion. In the unsolicited display message, the ADD record on the continuation comes just after the URD/[URS] pair instead of directly after the MSH.
g) transaction flow for a continued query-response pair with an ADD segment:
1) first query and response:
MSH
QRD
[QRF]
MSH
MSA
[ ERR ]
QRD
[QRF]
{ DSP } (last DSP segment is incomplete)
ADD (ADD segment contains no fields)
DSC
2) second query and response:
MSH
QRD
[QRF]
DSC (contains the continuation pointer from the DSC segment of prior response
message)
MSH
MSA
[ ERR ]
QRD
[QRF]
ADD (contains the remainder of the last DSP segment of the
previous response)
{DSP} (remaining DSP segments are complete)
Note: This second response could itself be continued with a second DSC and (if needed) a second ADD segment prior to it. This paradigm also applies to both original mode and enhanced mode queries of display and record oriented types. |
f) transaction flow for a continued unsolicited message with a continued segment.
1) first unsolicited message and acknowledgment:
MSH
URD
[ URS ]
{DSP} (last DSP is incomplete)
ADD (contains no fields)
DSC (Continuation segment)
MSH (General acknowledgment)
MSA
[ ERR ]
2) second unsolicited message and acknowledgment:
MSH (contains continuation pointer from DSC segment
of prior message)
ADD (contains remainder of data from continued DSP
segment from prior message)
{DSP}
Note: This second message could itself be continued with a second DSC and (if needed) a second ADD segment prior to it. |
MSH (General acknowledgment)
MSA
[ ERR ]