Previous | Contents | Index |
Read a message delivery failure log from a message file.
status = PMDF_read_failure_log
(dq_context, date, date_len, line, line_len)
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
status = PMDFreadFailureLog
(dq_context, date, date_len, line, line_len)
int PMDFreadFailureLog(PMDF_dq **dq_context, char *date, int *date_len, char *line, int *line_len)
dq_context
A message dequeue context created withPMDFdequeueInitialize
.date
A buffer to receive the time stamp indicating when the log record was written. Length must be at leastALFA_SIZE+1
bytes.date_len
Length in bytes of the time stamp. Callers usingPMDFreadFailureLog
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 leastBIGALFA_SIZE
bytes.line_len
Length in bytes of the line read. Callers usingPMDFreadFailureLog
must, on input, supply the maximum length in bytes of line.
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, thenPMDF__EOF
will be returned on the first read attempt. If however a log is present, then it can be read with repeated calls toPMDFreadFailureLog
. After reading the last line of the log from the message, a subsequent call toPMDFreadFailureLog
will return thePMDF__EOF
status code. That is, if two log lines remain to be read, then the next two calls will read those two lines and returnPMDF__OK
. A third call will not read any line and will returnPMDF__EOF
. The delivery failure log is generated withPMDFdequeueMessageEnd
when it defers a message. It is also generated withPMDFdeferMessage
.
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
orPMDFreadText
.PMDF__STRTRU Supplied string was too long; value truncated to fit.
Previous | Next | Contents | Index |