EDI Parsers must be able to understand data in EDI files in order to correctly parse them. EDI data files can look complex, however they must adhere to certain rules. For example, EDI data is grouped into segments. Segments contain data elements. EDI parsers must be able to distinguish between these logical containers. For this reason delimiter characters are used to separate segments and data elements from each other.
The question is how do EDI parsers figure out what the delimiters are. The answer lies in the first segment of the EDI file. This is called the Interchange Header segment or ISA. It contains vital information about the EDI file. This segment includes all the delimiter information that parsers can use to correctly parse EDI files. Consider the following ISA segment:
The length of the ISA segment length is fixed at 106 characters. Because EDI parsers know the length of the ISA segment they can easily get the delimiters they need to correctly parse EDI segments. For example
- Repetition Element Separator = Character #83 (^)
- Composite Element Separator = Character #105 (:)
- Segment Separator = Character #106 (:)
- Data Element Separator = Character #4 (*)
RDPCrystal EDI Library automatically detects all delimiters and uses this information to parse EDI files
Take Charge Of EDI