edilint / rule reference

envelope / error

EL3005

envelope.control-number

Applies to: x12

What it catches and why it matters

Header and trailer control numbers differ (ISA13/IEA02, GS06/GE02, ST02/SE02). A leading-zero-only difference is reported as a warning.

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).

ST*835*0001~SE*2*0002~

How to fix it

Make each trailer reference its actual header: ST02/SE02, GS06/GE02, and ISA13/IEA02. Determine the correct value from the source; do not guess between conflicting identifiers.

False positives and limits

Pairs differing only in leading zeros are warnings. Some receivers compare numerically, while others require exact text, so confirm the contract before accepting the difference.

Acknowledgments and suppression

Related acknowledgment codes (apply only to the described defect):
  TA1 code 001 (TA105): interchange control numbers in the header and trailer do not match
  999 code 4 (AK905): group control numbers in the header and trailer do not agree
  999 code 3 (IK502): transaction set control numbers in the header and trailer do not match
Suppress the rule with --disable EL3005, 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/EL3005.html

All rules · Configuration