Working with DFDL messages and bit streams
Use the ASBITSTREAM function and the CREATE statement to manage DFDL-described message content.
About this task
The ASBITSTREAM function
If you code an ASBITSTREAM function to parse your message tree to a bit stream, and the parser mode option is set to RootBitStream , the result is a DFDL document that is built from the children of the target element in the normal way. This algorithm is identical to the algorithm that is used to generate the normal output bit stream. Because the target element is not included in the output bit stream, you must ensure that the children of the target element follow the constraints for a DFDL document.
One constraint is that there must be only one body element in the message. You can use a well-formed bit stream obtained in this way to re-create the original logical tree by using a CREATE statement that includes a PARSE clause.
For further information about the ASBITSTREAM function, and some examples of its use, see ASBITSTREAM function.
The CREATE statement with a PARSE clause
If you code a CREATE statement with a PARSE clause to parse your bit stream to a message tree, and the parser mode option is set to RootBitStream, the expected bit stream is a normal DFDL-described message. An element is created in the logical tree for each element that is identified in the bit stream. This algorithm is identical to the algorithm that is used when parsing a bit stream from an input node.
For further information about the CREATE statement, and examples of its use, see CREATE statement.