BITSTREAM function (deprecated)
The BITSTREAM field function returns a value that represents the bit stream that is described by the given field and its children. Its use is deprecated; use the newer ASBITSTREAM function instead.
The BITSTREAM function can be used only on a tree produced by a parser belonging to an input node. The ASBITSTREAM function does not suffer from this limitation.
Syntax
The BITSTREAM function returns a value of type BLOB that represents
the bit stream that is described by the given field and its children. For
incoming messages, the appropriate portion of the incoming bit stream is used.
For messages that are constructed by Compute nodes, the following algorithm
is used to establish the ENCODING, CCSID, message set, message type, and message
format:
- If the addressed field has a previous sibling, and this sibling is the root of a subtree that belongs to a parser capable of providing an ENCODING and CCSID, these values are obtained and used to generate the requested bit stream. Otherwise, the integration node's default ENCODING and CCSID (that is, those of its queue manager) are used.
- Similarly, if the addressed field has a previous sibling, and this sibling is the root of a subtree that belongs to a parser capable of providing a message set, message type, and message format, these values are obtained and used to generate the requested bit stream. Otherwise, zero length strings are used.
This function is typically used for message warehouse scenarios,
where the bit stream of a message needs to be stored in a database. The function
returns the bit stream of the physical portion of the incoming message, identified
by the parameter. In some cases, it does not return the bit stream that represents
the actual field identified. For example, the following two calls return the
same value:
BITSTREAM(Root.MQMD);
BITSTREAM(Root.MQMD.UserIdentifier);
because they lie in the same
portion of the message.