Write a line of text to a message being enqueued.
status = PMDF_write_text (nq_context, text)
status = PMDFwriteText (nq_context, text, text_len)
int PMDFwriteText(PMDF_nq **nq_context, char *text, int text_len)
nq_contextA message enqueue context created with
textString of text to write to the message. Can not exceed a length of 65,535 bytes.
text_lenLength in bytes of text.
Text can be written to a message using
PMDFwriteLine. The only difference between these two routines is that
PMDFwriteLinealways appends a record terminator, line feed, to the end of each line it outputs.
PMDFwriteTextdoes not: it is left to callers of
PMDFwriteTextto include record terminators, where appropriate, in their text. This gives slightly more flexibility than
PMDFwriteLinein that a single call can output multiple lines or multiple calls can output a single line. Note that each distinct line (record) in a message must be terminated with a line feed. If this terminator is omitted then, in the message being composed, the subsequent line will be appended directly to the end the line lacking a terminator. While this is merely a nuisance in a message body, it can introduce serious errors into the message header. Programs which loop reading lines from a queued message and writing them to a new message should use
PMDFwriteTextin their loop. This is more efficient than
PMDFwriteLinewhich will needlessly strip away and then re-append a record terminator for each line read and written.
PMDF__OK Normal, successful completion. PMDF__BADCONTEXT Illegal or corrupt context. Text not written. PMDF__INVSTRDES Invalid string descriptor for text: descriptor has an invalid value in its DSC$B_CLASS field. Text not written.