Envoy Application Programming Manual

Table Of Contents
BISYNC Point-To-Point Protocol
Envoy Application Programming Manual427159-001
3-14
Intermediate Text Blocking
Normal Text With ITBs
Normal text with intermediate text blocks is indicated by a nonzero intermediate block
length and messages having the following form:
message = STX—text—ITB...—text—ETB
message = STX—text—ITB...—text—ETX
(message length = 2 + text length + number of intermediate blocks - 1)
or
message = SOH—heading—STX—text—ITB...—text—ETB
message = SOH—heading—STX—text—ITB...—text—ETX
(message length = 1 + heading length + 2 + text length + number of intermediate
blocks - 1)
Here, the application process must embed ITB (%37) characters at the end of each
intermediate block except the last. The message must be terminated with an ETB or
ETX character. The intermediate block length must be specified as a value equal to or
greater than the longest intermediate text block to be transmitted.
Transparent Text With ITBs
Transparent text with intermediate text blocks is indicated by a nonzero intermediate
block length and messages having the following form:
message = DLE STX—text—ETB
message = DLE STX—text—ETX
(message length = 3 + text length)
or
message = SOH—heading—DLE STX—text—ETB
message = SOH—heading—DLE STX—text—ETX
(message length = 1 + heading length + 3 + text length)
When transparent text is sent, the application program does not embed the ITB
characters (therefore, the ITBSIZE should not include the ITB character). Instead,
Envoy embeds the ITB characters upon actual transmission, dividing the text into
segments as indicated by the ITBSIZE modifier, as follows:
Envoy sends transparent text messages as blocks of characters of the specified ITB
length.
The last block contains fewer characters if the text length is not evenly divisible by
the intermediate block length.
An ITB character is appended by Envoy to each intermediate block except the last.
Upon receipt of transparent text (if intermediate text blocking is indicated), Envoy
deletes ITB characters occurring at the end of each intermediate block (the length of
each block received must be the same as the specified intermediate block length).
However, the READ count must be large enough to include the DLE ITBs, even though
they are stripped by Envoy before being passed to the application.