PMDF Programmer's Reference Manual
PMDF-PRM-6.0


Previous | Contents

PMDF_write_line

Write a line of text to a message being enqueued.

VMS FORMAT

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 FORMAT

status = PMDFwriteLine (nq_context, line, line_len)

argument information
int PMDFwriteLine (nq_context, line, line_len) 
         PMDF_nq **nq_context; 
         char     *line; 
         int       line_len; 

ARGUMENTS

nq_context

A message enqueue context created with PMDF_start_message_envelope.

line

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

line_len

Length in bytes of line.

DESCRIPTION

Text may be written to a message using PMDF_write_line or PMDF_write_text. The only difference between these two routines is that PMDF_write_line always appends a record terminator, line feed, to the end of each line it outputs. PMDF_write_text does not: it is left to callers of PMDF_write_text to include record terminators, where appropriate, in their output. Each line written with PMDF_write_line will appear as a single line (record) in the message being composed. For this reason, PMDF_write_line is often more convenient to use than PMDF_write_text. However, programs which loop reading lines from a queued message and writing them to a new message should use PMDF_read_text and PMDF_write_text in their loop. This is more efficient than PMDF_read_line and PMDF_write_line 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