PMDF Programmer's Reference Manual


Previous Contents Index


PMDFreadFailureLog

Read a message delivery failure log from a message file.

PASCAL

status = PMDF_read_failure_log

(dq_context, date, date_len, line, line_len)

argument information

Argument Data type Access Mechanism
dq_context context pointer read/write reference
date descriptor read/write reference
date_len unsigned word write reference
line descriptor read/write reference
line_len unsigned word write reference

C

status = PMDFreadFailureLog

(dq_context, date, date_len, line, line_len)

argument information


int PMDFreadFailureLog(PMDF_dq **dq_context, 
                       char     *date, 
                       int      *date_len, 
                       char     *line, 
                       int      *line_len) 


Arguments

dq_context

A message dequeue context created with PMDFdequeueInitialize .

date

A buffer to receive the time stamp indicating when the log record was written. Length must be at least ALFA_SIZE+1 bytes.

date_len

Length in bytes of the time stamp. Callers using PMDFreadFailureLog must, on input, supply the maximum length in bytes of date.

line

A buffer to receive the log line read from the message delivery failure log. Length must be at least BIGALFA_SIZE bytes.

line_len

Length in bytes of the line read. Callers using PMDFreadFailureLog must, on input, supply the maximum length in bytes of line.

Description

Messages can contain a delivery failure log detailing why previous delivery attempts, if any, failed. This log can be read only after the message content (headers and body) has been read. If no log is present, then PMDF__EOF will be returned on the first read attempt. If however a log is present, then it can be read with repeated calls to PMDFreadFailureLog . After reading the last line of the log from the message, a subsequent call to PMDFreadFailureLog will return the PMDF__EOF status code. That is, if two log lines remain to be read, then the next two calls will read those two lines and return PMDF__OK . A third call will not read any line and will return PMDF__EOF . The delivery failure log is generated with PMDFdequeueMessageEnd when it defers a message. It is also generated with PMDFdeferMessage .

Return Values

PMDF__OK Normal, successful completion.
PMDF__BADCONTEXT Illegal or corrupt context. No data returned; no line read.
PMDF__EOF End of message.
PMDF__FATERRLIB Call to LIB$SCOPY_R_DX failed owing to a fatal internal error in the OpenVMS Run Time Library. No data returned although a line was read.
PMDF__INSVIRMEM Insufficient virtual memory: call to LIB$GET_VM made by LIB$SCOPY_R_DX has failed. No data returned although a line was read.
PMDF__INVSTRDES Invalid string descriptor for either date or line: descriptor for one or both has an invalid value in its DSC$B_CLASS field. No data returned; however, a line was read.
PMDF_NO Message read point is at the wrong location; must first read to the end of the message body with PMDFreadLine or PMDFreadText.
PMDF__STRTRU Supplied string was too long; value truncated to fit.


Previous Next Contents Index