In EDI (Electronic Data Interchange), element terminators and segment terminators are both special characters used to separate data, but they operate at different levels of the message structure.
1. Element Terminator
- Purpose: Separates individual data elements within a segment.
- Example character:
*(asterisk) in X12 or+in EDIFACT. - Think of it as: A comma in a CSV file — it divides values within the same “line” (segment).
Example (X12):
N1*ST*ABC COMPANY*92*12345Here:
N1→ Segment ID (Name)ST→ Entity Identifier CodeABC COMPANY→ Name92→ Identification Code Qualifier12345→ Identification Code
Element terminator:*(separates each piece of data within the N1 segment)
2. Segment Terminator
- Purpose: Marks the end of an entire segment.
- Example character:
~(tilde) in X12 or'(apostrophe) in EDIFACT. - Think of it as: The newline at the end of a CSV row — it says “this row is done.”
Example (X12):
N1*ST*ABC COMPANY*92*12345~Here:
- The
~tells the system that the N1 segment is complete, and the next segment will follow.
Example (X12)
ISA*00* *00* *12*SENDERID *12*RECEIVERID *230814*1234*U*00401*000000001*0*T*:~- Element terminator:
*→ separatesISA,00, , etc. - Segment terminator:
~→ says “end of the ISA segment.”
Recommended Action: Review and validate the segment terminator for this file. Confirm it is a valid character, and the same character is not being used as another delimiter. Correct and resend.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article