> tibemsMsgField
> Type
> Purpose
> Represents a message field or property.
> C Declaration
> typedef struct {
> tibems_byte type;
> tibems_int size;
> tibems_int count;
> tibemsData data;
> } tibemsMsgField
> COBOL
> 01 tibemsMsgField.
> 05 MsgFld-type PIC X(1).
> 88 TIBEMS-NULL VALUE X'00'.
> 88 TIBEMS-BOOL VALUE X'01'.
> 88 TIBEMS-BYTE VALUE X'02'.
> 88 TIBEMS-WCHAR VALUE X'03'.
> 88 TIBEMS-SHORT VALUE X'04'.
> 88 TIBEMS-INT VALUE X'05'.
> 88 TIBEMS-LONG VALUE X'06'.
> 88 TIBEMS-FLOAT VALUE X'07'.
> 88 TIBEMS-DOUBLE VALUE X'08'.
> 88 TIBEMS-UTF8 VALUE X'09'.
> 88 TIBEMS-BYTES VALUE X'0A'.
> 88 TIBEMS-MAP-MSG VALUE X'0B'.
> 88 TIBEMS-STREAM-MSG VALUE X'0C'.
> 88 TIBEMS-SHORT-ARRAY VALUE X'14'.
> 88 TIBEMS-INT-ARRAY VALUE X'15'.
> 88 TIBEMS-LONG-ARRAY VALUE X'16'.
> 88 TIBEMS-FLOAT-ARRAY VALUE X'17'.
> 88 TIBEMS-DOUBLE-ARRAY VALUE X'18'.
> 05 Filler PIC X(3).
> 05 MsgFld-size PIC S9(9) BINARY.
> 05 MsgFld-count PIC S9(9) BINARY.
> 05 Filler PIC X(4).
> 05 MsgFld-data.
> 10 MFD PIC X(8).
> Remarks
> Any message can have property values. Only map messages and stream messages can have fields.

> Field | Description
> type | A one-byte indicator of the field’s datatype; for values, see Table 10 below.
> size | The size of the data (in bytes). Zero is a special value, indicating that the size is unknown.
> count | If the data is an array, this value is the number of elements in the array.
> data | The actual data in the field, or the property value.

> Table 10 Message Field Type Indicators
> Constant | Value | Comment
> TIBEMS_NULL | 0 |
> TIBEMS_BOOL | 1 |
> TIBEMS_BYTE | 2 |
> TIBEMS_WCHAR | 3 | wide character; 2 bytes
> TIBEMS_SHORT | 4 |
> TIBEMS_INT | 5 |
> TIBEMS_LONG | 6 |
> TIBEMS_FLOAT | 7 |
> TIBEMS_DOUBLE | 8 |
> TIBEMS_UTF8 | 9 | UTF8-encoded string
> TIBEMS_BYTES | 10 |
> TIBEMS_MAP_MSG | 11 |
> TIBEMS_STREAM_MSG | 12 |
> TIBEMS_SHORT_ARRAY | 20 |
> TIBEMS_INT_ARRAY | 21 |
> TIBEMS_LONG_ARRAY | 22 |
> TIBEMS_FLOAT_ARRAY | 23 |
> TIBEMS_DOUBLE_ARRAY | 24 |

> See Also
> tibemsMsg_GetProperty, listed at tibemsMsg_Get Property on page 45
> tibemsMapMsg_GetField, listed at tibemsMapMsg_Get on page 90
> tibemsStreamMsg_FreeField on page 110
> tibemsStreamMsg_ReadField on page 115
> tibemsMsgEnum_GetNextName on page 131
> tibemsMsgField_Print
> Function
> Purpose
> Print a message field.
> C Declaration
> void tibemsMsgField_Print(
> tibemsMsgField* field );
> COBOL Call
> CALL "tibemsMsgField_Print"
> USING BY REFERENCE field,
> END-CALL.
> Parameters

> Parameter | Description
> field | Print this message field instance.

> Remarks
> tibemsMsgField_Print prints to stdout in the format FieldDataType:Value.
> tibemsMsgField_PrintToBuffer
> Function
> Purpose
> Print a message field into a buffer.
> C Declaration
> tibems_status tibemsMsgField_PrintToBuffer(
> tibemsMsgField* field,
> char* buffer,
> tibems_int maxlen);
> COBOL Call
> CALL "tibemsMsgField_PrintToBuffer"
> USING BY REFERENCE field,
> BY REFERENCE buffer,
> BY VALUE maxlen,
> RETURNING tibems-status
> END-CALL.
> Parameters

> Parameter | Description
> field | Print this message field instance.
> buffer | Location to store the string representation of the message.
> maxlen | The size of the buffer.

> Remarks
> tibemsMsgField_PrintToBuffer prints to a buffer, in the format FieldDataType:Value.

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

Copyright © TIBCO Software Inc. All Rights Reserved.