IBM Integration Bus, Version 10.0.0.1 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS


Setting null values in a message in the DFDL domain

You can use implicit or explicit null processing to set the value of an element to NULL in an output message.

About this task

To set a value of an element in an output message, you normally code an ESQL statement, for example:

SET OutputRoot.DFDL.MyMessage.Elem2.Child1 = 'xyz';  

or its equivalent statement:

SET OutputRoot.DFDL.MyMessage.Elem2.Child1 VALUE = 'xyz';  

If you set the element to a non-null value, these two statements give identical results. However, if you want to set the value to null, these two statements do not give the same result:

Procedure

  1. If you set the element to NULL using the following statement, the element is deleted from the message tree:
    SET OutputRoot.DFDL.MyMessage.Elem2.Child1 = NULL; 

    This is called implicit null processing.

  2. If you set the value of this element to NULL as follows:
    SET OutputRoot.DFDL.MyMessage.Elem2.Child1 VALUE = NULL;
    the element is not deleted from the message tree. Instead, a special value of NULL is assigned to the element.

    This is called explicit null processing.

Results

Setting a complex element to NULL deletes that element and all its children.


bc40796_.htm | Last updated 2015-05-28 20:52:27