Skip to main content
Version: v0.0.9

Variable: CONTROL_NUMBER_PAIRS

const CONTROL_NUMBER_PAIRS: object

Which header/trailer control-number pair disagreed. A library-owned discriminant, NOT a value read out of the document: the useful part of the diagnostic is that the two disagree and where each one sits, never what either one says.

Type Declaration

GROUP

readonly GROUP: "group" = "group"

GS-06 against GE-02.

INTERCHANGE

readonly INTERCHANGE: "interchange" = "interchange"

ISA-13 against IEA-02.

TRANSACTION

readonly TRANSACTION: "transaction" = "transaction"

ST-02 against SE-02.

Example

import { controlNumberMismatch, CONTROL_NUMBER_PAIRS } from "@cosyte/x12";
const w = controlNumberMismatch({ segmentIndex: 6 }, CONTROL_NUMBER_PAIRS.INTERCHANGE);