TextMessage
- Last Updated: February 11, 2026
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
A TextMessage is a message type whose body
contains text data.
The following table lists the methods for handling text messages.
| Create method | Populate method | Access method |
|---|---|---|
| createTextMessage procedure | setText procedure setLongText procedure appendText procedure reset procedure clearBody procedure | endOfStream function getCharCount function getText function getTextSegment function getLongText function getLongTextCP function |
For any TextMessage smaller than 32K, text data can
be extracted and stored in a message by the getText function and
the setText procedure method. For a TextMessage longer
than 32K, the setLongText procedure and the getLongText
function are available. Use of these calls
is recommended for new code developed to process large character
strings.
The appendText procedure and the getTextSegment
function concatenate text segments. With multiple appendText
procedure calls, an OpenEdge client can create
a TextMessage up to the limit of the JMS server.
The JMS non-OpenEdge client receives a single TextMessage resulting
from the concatenation of all the text segments.
The Progress OpenEdge JMS Adapter divides the received TextMessage into text segments of 8K (8192) or fewer characters. An
application can then use multiple getTextSegment function calls to retrieve these segments. If
getText function is called instead, the ABL–JMS API returns all of the text, and a run-time
error occurs if the TextMessage is too large for the ABL
interpreter to handle. An application can use the getCharCount function call to determine the
total number of characters in a message.
For example, if the message value is UNKNOWN,
or "", or a String of 5,000 characters, an application
can use one getText function call (or one getTextSegment
function call). If the message size is 16,400
characters, the first two getTextSegment function calls
return 8192 characters each, and the last getTextSegment function call returns 16 characters.
The endOfStream function function returns true when all of the segments are retrieved (that is, when the number of getTextSegment function calls matches the number of segments). The setText procedure call implicitly calls clearBody procedure before setting the new text. The reset procedure and getText function calls transfer the message from write-only to read-only mode and position the message cursor before the first segment.
For more information, see Read-only and write-only modes.