tibemsBytesMsg_Write

Function

Purpose

Write primitive datatypes to the byte stream in the message body.

C Declaration

tibems_status tibemsBytesMsg_WriteBoolean(
    tibemsBytesMsg message,
    tibems_bool value );

tibems_status tibemsBytesMsg_WriteByte(
    tibemsBytesMsg message,
    tibems_byte value );

tibems_status tibemsBytesMsg_WriteChar(
    tibemsBytesMsg message,
    tibems_wchar value );

tibems_status tibemsBytesMsg_WriteDouble(
    tibemsBytesMsg message,
    tibems_double value );

tibems_status tibemsBytesMsg_WriteFloat(
    tibemsBytesMsg message,
    tibems_float value );

tibems_status tibemsBytesMsg_WriteInt(
    tibemsBytesMsg message,
    tibems_int value );

tibems_status tibemsBytesMsg_WriteLong(
    tibemsBytesMsg message,
    tibems_long value );

tibems_status tibemsBytesMsg_WriteShort(
    tibemsBytesMsg message,
    tibems_short value );

COBOL Call

CALL "tibemsBytesMsg_WriteBoolean"
 USING BY VALUE message,
       BY VALUE tibems-Boolean,
       RETURNING tibems-status
END-CALL.

CALL "tibemsBytesMsg_WriteByte"
 USING BY VALUE message,
       BY VALUE value,
       RETURNING tibems-status
END-CALL.

CALL "tibemsBytesMsg_WriteChar"
 USING BY VALUE message,
       BY VALUE value,
       RETURNING tibems-status
END-CALL.

CALL "tibemsBytesMsg_WriteDouble"
 USING BY VALUE message,
       BY VALUE value,
       RETURNING tibems-status
END-CALL.

CALL "tibemsBytesMsg_WriteFloat"
 USING BY VALUE message,
       BY VALUE value,
       RETURNING tibems-status
END-CALL.

CALL "tibemsBytesMsg_WriteInt"
 USING BY VALUE message,
       BY VALUE value,
       RETURNING tibems-status
END-CALL.

CALL "tibemsBytesMsg_WriteLong"
 USING BY VALUE message,
       BY VALUE value,
       RETURNING tibems-status
END-CALL.

CALL "tibemsBytesMsg_WriteShort"
 USING BY VALUE message,
       BY VALUE value,
       RETURNING tibems-status
END-CALL.
Note: message has usage pointer in all calls.

Parameters

Parameter Description
message Write data to the body of this bytes message.
value Write this value to the message.

Remarks

The JMS specification defines these nine calls to insert data into the byte stream of a BytesMessage.

Each call writes a data value to the stream, and advances the write position so that the next write call appends to the new end of the stream.

Function # Bytes Notes
tibemsBytesMsg_WriteBoolean 1 This function writes true as (byte)1, and false as (byte)0.
tibemsBytesMsg_WriteByte 1  
tibemsBytesMsg_WriteShort 2  
tibemsBytesMsg_WriteChar 2 This function writes a 2-byte character—high byte first.
tibemsBytesMsg_WriteInt 4  
tibemsBytesMsg_WriteLong 8  
tibemsBytesMsg_WriteFloat 4  
tibemsBytesMsg_WriteDouble 8