All UN/EDIFACT messages have a UNA segment (service string advice). It is used to send delimiter and indicator characters. The UNA segment is optional per the UN/EDIFACT specification.
The string has a mandatory fixed length of 9 characters. The first three are “UNA,” immediately followed by the 6 characters as defined in ISO 9735.
The UNA segment template is a fixed length with segment ID = UNA, followed by 6 one-byte fields. Each field specifies a separator or other service character. For more information, refer to Setting Delimiters and Indicators.
The OTD Library provides the getmarshalUNA() method to UN/EDIFACT OTD top “outer” level with its Java type of java.lang.Boolean. For information, refer to getMarshalUNA.
If its value is java.lang.Boolean.TRUE, then UNA segment data is always included in the output message.
If its value is java.lang.Boolean.FALSE, then UNA segment data is never included in the output message.
If its value is null (or user never sets its value), then inclusion of UNA segment data in the output message is based on the following:
If any delimiter values are set through UNA segment object, the UNA segment data is included in the output message regardless of default or non-default delimiters are used. Otherwise,
If non-default delimiters are used, then UNA segment data is included in the output message.
If default delimiters are used, then UNA segment data is not included in the output message.