Previous | Contents | Index |
Write a line of text to a message being enqueued.
status = PMDF_write_line (nq_context, line)
Argument Data type Access Mechanism nq_context context pointer read/write reference line descriptor read reference
status = PMDFwriteLine (nq_context, line, line_len)
int PMDFwriteLine(PMDF_nq **nq_context, char *line, int line_len)
nq_context
A message enqueue context created withPMDFstartMessageEnvelope
.line
Line of text to write to the message. Length can not exceed 65,535 bytes.line_len
Length in bytes of line.
Text can be written to a message usingPMDFwriteLine
orPMDFwriteText
. 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 output. Each line written withPMDFwriteLine
will appear as a single line (record) in the message being composed. For this reason,PMDFwriteLine
is often more convenient to use thanPMDFwriteText
. However, 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. Line not written. PMDF__INVSTRDES Invalid string descriptor for line: descriptor has an invalid value in its DSC$B_CLASS field. Line not written.
Previous | Next | Contents | Index |