edilint / rule reference

terminator / error

EL2003

terminator.x12-segment

Applies to: x12

What it catches and why it matters

Segment is not closed by the segment terminator the ISA declared.

Failing example

These synthetic fragments illustrate the defect; they are not complete interchange files. Backslash escapes name bytes such as \r (CR) and \n (LF).

An ISA declares ~ as the segment terminator, but the file ends with IEA*1*000000001 and no ~.

How to fix it

Check for truncation and regenerate missing data first. If only the final terminator is missing, preview edilint fix; it can append the declared terminator.

False positives and limits

Incorrect ISA separator declarations can make otherwise visible terminators look missing. Check ISA before assuming the last byte is the only problem.

Acknowledgments and suppression

Related acknowledgment codes (apply only to the described defect):
  TA1 code 004 (TA105): the segment terminator is invalid
  TA1 code 023 (TA105): premature end of file, when the unterminated segment swallows the trailer
Suppress the rule with --disable EL2003, or list it under "disable" in .edilint.yml. To accept the occurrences a file already has without suppressing the rule, record them with --write-baseline and run with --baseline.
Reference: https://crb2nu.github.io/edilint/rules/EL2003.html

All rules · Configuration