# tibemsStreamMsg_ReadField

Function

## Purpose

Read a field from a stream message.

## C Declaration

    tibems_status tibemsStreamMsg_ReadField(
        tibemsStreamMsg message,
        tibemsMsgField* value );

## COBOL Call

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

Note: `message` has usage pointer.

## Parameters

Parameter | Description
--- | ---
`message` | Read a field struct from this message.
`value` | The function stores a pointer to the field struct.

## Remarks

Each call reads a field from the stream, and advances the read position so that the next read call gets the next datum. (Other read functions are documented on separate pages.)

## Freeing Fields

Each successful call to `tibemsStreamMsg_ReadField` creates a field struct. Field structs can contain data in allocated storage. Programs that call `tibemsStreamMsg_ReadField` must subsequently call `tibemsStreamMsg_FreeField` to free that allocated storage.

## See Also

`tibemsStreamMsg_FreeField`

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