Electronic Data Interchange
The Data Element (UN/EDIFACT)

The Data Element is the smallest data structure in the standard.  It not only carries the actual data value, but also contains the properties that describe the data.  There are two types of data elements:

Simple data elements and component data elements are fundamentally the same, but differ under the following:

Outside of the difference above, in a nutshell, one can view all elements as simple data elements, and should they become part of a composite data structure do they become component data elements.  A data element can both be a simple data element and a component data element.

The data element has the following properties:

In the context of a data segment or a composite element, the data element has the following additional properties:

Some data elements are constrained to having a list of values.  This list of code values is part of the data element definition, and it is in error if a data element should contain a value not part of this list.  The values in this list conform to the data requirement specified for the data element.  That is, they are within the minimum and maximum length of characters, and they are of the same data type.

Data Types

The following data types are available for the controlling agencies.

Data Length

The length of data is the number of characters in the value.  One graphic character is counted as one character. Chinese and Japnaese characters may constitue two or three bytes for a single graphic character, which still counts as one character.  The following exceptions apply where some characters are not included in the count:

Plus and Minus Signs

For decimal and numeric data types the minus/hyphen (“-“) sign preceding a number signifies a negative value while the plus (“+”) sign signifies a positive value. When no sign precedes the number, it is taken as a positive value. When transmitting any number that is positive, the “+” should always be suppressed.

Leading and Trailing Zeros

For decimal and numeric data types, leading zeros should be suppressed unless required to satisfy a minimum length requirement. For EDIFACT, when a decimal point precedes the first digit in the number, a single leading zero is required (example, 0.123). For X12, this leading zero is suppressed (example .123).

When only zeros follow a decimal point, the trailing zeros should be suppressed. However, if it becomes necessary to include the decimal point a single zero should follow the decimal point (example 123.0). Zeros after the decimal to indicate precision is also allowed.

For time data type in X12, the trailing zeros can also be used in decimal seconds to satisfy the minimum length requirement.

Triad Separators

For decimal and numeric data types, triad separators are not allowed. For example, the value "5,000,000,000" must be represented as "5000000000".

Spaces

For string, identifier, alphabetic and alphanumeric data types, trailing spaces are suppressed.  An element containing only spaces as its value is illegal.