Previous | Contents | Index |
Write a line of text to a message being enqueued.
status = PMDF_write_text (nq_context, text)
Argument Data type Access Mechanism nq_context context pointer read/write reference text descriptor read reference
status = PMDFwriteText (nq_context, text, text_len)
int PMDFwriteText(PMDF_nq **nq_context, char *text, int text_len)
nq_context
A message enqueue context created withPMDFstartMessageEnvelope
.text
String of text to write to the message. Can not exceed a length of 65,535 bytes.text_len
Length in bytes of text.
Text can be written to a message usingPMDFwriteText
orPMDFwriteLine
. The only difference between these two routines is thatPMDFwriteLine
always appends a record terminator, line feed, to the end of each line it outputs.PMDFwriteText
does not: it is left to callers ofPMDFwriteText
to include record terminators, where appropriate, in their text. This gives slightly more flexibility thanPMDFwriteLine
in 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 usePMDFreadText
andPMDFwriteText
in their loop. This is more efficient thanPMDFreadLine
andPMDFwriteLine
which 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.
Previous | Next | Contents | Index |