PMDF Programmer's Reference Manual
PMDF-PRM-6.0


Previous | Contents

PMDF_copy_message

Make a verbatim copy of a message header and content.

VMS FORMAT

status = PMDF_copy_message

(dq_context, nq_context)

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

C FORMAT

status = PMDFcopyMessage

(dq_context, nq_context)

argument information
int PMDFcopyMessage (dq_context, nq_context) 
         PMDF_dq **dq_context; 
         PMDF_nq **nq_context; 

ARGUMENTS

dq_context

A message dequeue context created with PMDF_dequeue_initialize.

nq_context

A message enqueue context created with PMDF_start_message_envelope.

DESCRIPTION

Use PMDF_copy_message to efficiently copy to a new message being enqueued a verbatim copy of a message being dequeued. Only the portion of the dequeued message following the read point for that message will be copied. Thus, if the entire dequeued message --- header and content --- is to be copied, then it may be necessary to first call PMDF_rewind_message. PMDF_copy_message is especially useful in cases where a message needs to have it's envelope changed but be left enqueued. For example, when a message was successfully delivered to some but not all recipients. In that case, if some of the recipients could not be delivered to owing to temporary problems, the message should be re-enqueued verbatim to just those recipients who could not be handled because of temporary problems. In such a case, be sure to also call PMDF_alias_no_expansion while enqueuing the new message.
Return Values
PMDF__OK Normal, successful completion.
PMDF__BADCONTEXT Bad value passed for dq_context or nq_context.


Previous | Next | Contents