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

See information about the latest product version

Setting null values in a message in the MRM domain

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

To set a value of an element in an output message, you normally code an ESQL statement similar to the following:

SET OutputRoot.MRM.Elem2.Child1 = 'xyz';  

or its equivalent statement:

SET OutputRoot.MRM.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:

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

    The content of the output bit stream depends on the physical format:

    • For an XML element, neither the XML tag or attribute nor its value are included in the output bit stream.
    • For a Delimited TDS element, neither the tag (if appropriate) nor its value are included in the output bit stream. The absence of the element is typically conveyed by two adjacent delimiters.
    • For a CWF or Fixed Length TDS element, the content of the output bit stream depends on whether you have set the Default Value property for the element. If you have set this property, the default value is included in the bit stream. If you have not set the property, an exception is raised.

    This is called implicit null processing.

  2. If you set the value of this element to NULL as follows:
    SET OutputRoot.MRM.Elem2.Child1 VALUE = NULL;
    the element is not deleted from the message tree. Instead, a special value of NULL is assigned to the element. The content of the output bit stream depends on the settings of the physical format null-handling properties.

    This is called explicit null processing.

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


ac06060_.htm | Last updated Friday, 21 July 2017