PMDF Programmer's Reference Manual
PMDF-PRM-6.0
Previous
| Contents
PMDF_write_text
Write a line of text to a message being enqueued.
VMS FORMAT
status = PMDF_write_text (nq_context, text)
argument information
| Argument |
Data type |
Access |
Mechanism |
| nq_context |
context pointer |
read/write |
reference |
| text |
descriptor |
read |
reference |
C FORMAT
status = PMDFwriteText (nq_context, text, text_len)
argument information
int PMDFwriteText (nq_context, text, text_len)
PMDF_nq **nq_context;
char *text;
int text_len;
ARGUMENTS
nq_context
A message enqueue context created with PMDF_start_message_envelope.
text
String of text to write to the message. May not exceed a length of
65,535 bytes.
text_len
Length in bytes of text.
DESCRIPTION
Text may be written to a message using PMDF_write_text or
PMDF_write_line. 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 text. This gives slightly more flexibility than
PMDF_write_line in that a single call may output multiple lines or
multiple calls may 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 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. 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