PMDF Programmer's Reference Manual


Previous Next Contents Index


PMDFwriteLine

Write a line of text to a message being enqueued.

PASCAL

status = PMDF_write_line (nq_context, line)

argument information
Argument Data type Access Mechanism
nq_context context pointer read/write reference
line descriptor read reference

C

status = PMDFwriteLine (nq_context, line, line_len)

argument information


int PMDFwriteLine(PMDF_nq **nq_context, 
                  char     *line, 
                  int       line_len) 


Arguments

nq_context

A message enqueue context created with PMDFstartMessageEnvelope.

line

Line of text to write to the message. Length can not exceed 65,535 bytes.

line_len

Length in bytes of line.

Description

Text can be written to a message using PMDFwriteLine or PMDFwriteText. The only difference between these two routines is that PMDFwriteLine always appends a record terminator, line feed, to the end of each line it outputs. PMDFwriteText does not: it is left to callers of PMDFwriteText to include record terminators, where appropriate, in their output. Each line written with PMDFwriteLine will appear as a single line (record) in the message being composed. For this reason, PMDFwriteLine is often more convenient to use than PMDFwriteText. However, programs which loop reading lines from a queued message and writing them to a new message should use PMDFreadText and PMDFwriteText in their loop. This is more efficient than PMDFreadLine and PMDFwriteLine which will needlessly strip away and then re-append a record terminator for each line read and written.

Return Values

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