That is, the first message block of a message may be attached to other message blocks that are part of the same message. Multiple blocks in a message can occur, for example, as the result of processing that adds header or trailer data to the data contained in the message, or because of size limitations in the message buffer that cause the data to span multiple blocks. When a message is composed of multiple message blocks, the message type of the first block determines the type of the entire message, regardless of the types of the attached message blocks. If the data for a message exceeds the size of the buffer containing the data, the procedure can allocate a new block containing a larger buffer, copy the current data to it, insert the new data, and deallocate the old block. Both alternatives yield one new message.
Messages can exist standalone when the message is being processed by a procedure.
In the Message Queue diagram , Message 1 is linked to Message 2. A procedure can request the allocation of a message of a specified size at one of three message pool priorities. The allocb utility returns a message containing a single block with a buffer of at least the size requested, provided there is a buffer available at the priority requested. When requesting priority for messages, developers must weigh the process' need for resources against the needs of other processes on the same machine. A driver or module can assign most types to a message it generates, and a module can modify a message type during processing.