# tibemsMsg_PrintToBuffer

Function

## Purpose

Print a message into a buffer.

## C Declaration

    tibems_status tibemsMsg_PrintToBuffer(
        tibemsMsg message,
        char* buffer,
        tibems_int maxlen );

## COBOL Call

    CALL "tibemsMsg_PrintToBuffer"
        USING BY VALUE message,
        BY REFERENCE buffer,
        BY VALUE maxlen,
        RETURNING tibems-status
    END-CALL.

Note: `message` has usage pointer.

## Parameters

Parameter | Description
--- | ---
`message` | Print this message.
`buffer` | Location to store the string representation of the message.
`maxlen` | Size of the buffer.

## Remarks

This call prints a string that includes the body type, headers (name-value pairs), properties (name-value pairs), and body content.

`tibemsMsg_PrintToBuffer` prints the message to a buffer.

Status Code | Description
--- | ---
`TIBEMS_INSUFFICIENT_BUFFER` | The buffer is too small to hold the data.

## See Also

`tibemsMsg_Print`

Copyright © Cloud Software Group, Inc. All rights reserved.