PMDF Programmer's Reference Manual


Previous Next Contents Index

2.1.3 Message Headers & Content

The body of a message (i.e., the message content) to be sent is built up from zero or more input files or procedures. The input files and procedures are read or invoked in the order specified in the item list passed to PMDF_send and the message body built up by appending the next input source to the end of the previous input source. A blank line will be inserted in the message as a separator between input sources if the PMDF_BLANK item is requested in the item list. The PMDF_MSG_FILE and PMDF_MSG_PROC items are used to specify the name or address of input files or procedures.

An initial message header can be supplied via either an input file or procedure. The message header will then be modified as needed when the message is enqueued. The PMDF_HDR_FILE and PMDF_HDR_PROC items are used to specify the name or address of an input file or procedure. If an initial message header is to be supplied, it must appear in the item list before any PMDF_MSG_FILE or PMDF_MSG_PROC items. A blank line must be supplied at the end of the message header or at the start of the first message body input source. This blank line will automatically be supplied when the PMDF_BLANK item code is specified in the item list.

The PMDF_MODE_ and PMDF_ENC_ items control the access mode and encodings applied to message body input sources. These items set the current access mode and encoding to be applied to all subsequent input sources which appear in the item list. The default access mode is PMDF_MODE_UNKNOWN which uses a text mode access and the default encoding is PMDF_ENC_UNKNOWN which results in no encoding of the data. The block access mode will not be applied to input procedures; the access mode and encodings do not apply to input sources for an initial message header which is always accessed using the default access mode and never encoded.

Input procedures use the calling format:
status = proc (bufadr, buflen) where

The return value status is an integer which should be set to zero (0) when there are no more lines to return and one (1) at all other times including when the last line itself is returned.


Previous Next Contents Index