CFONB 120 — account statement format

Copy Markdown View Source

Reference for the fields this library parses. Source of truth: the official CFONB brochure "Relevé de compte sur support informatique" (Juillet 2004). Positions are 1-indexed; each record is exactly 120 characters.

Conventions:

  • Numeric zones are right-aligned and zero-filled.
  • Alphanumeric zones are left-aligned and blank-filled.
  • S status: Mandatory, Optional, Dependent, N reserved (kept blank).

Common header (positions 1–32)

PosLenFieldNotes
12Record code01, 04, 05, 07
35Bank code
84Internal operation codeoperation/detail only; reserved on balances
125Branch code (guichet)
173Currency (ISO 4217)
201Number of decimals (scale)applies to the amount field
2211Account number

Record 01 / 07 — previous / new balance

PosLenField
356Date JJMMAA
9114Amount (signed, see below)

Record 04 — operation (mouvement)

PosLenField
332Interbank operation code
356Accounting date JJMMAA
412Rejection reason code (dependent)
436Value date JJMMAA
4932Label (libellé)
827Entry number (numéro d'écriture)
891Commission-exemption flag
901Unavailability flag
9114Amount (signed)
10516Reference

Record 05 — operation detail (complément)

Optional, repeatable after a 04. Adds qualifier-tagged extra information.

PosLenField
463Qualifier (e.g. LIB, REF, NPY, FEE)
4970Complementary information

Amount encoding (signed)

The 14-character amount field is 13 digits + 1 specifier. The specifier encodes both the units digit and the sign:

SignUnits 0–9
+{ A B C D E F G H I
-} J K L M N O P Q R

Value = sign × (13 digits ++ units) / 10^scale.

Example: 0000000001904} with scale 2−190.40.

Dates

JJMMAA (day, month, 2-digit year). The year pivots at 60: > 6019xx, otherwise 20xx. A blank date field means "no date" (nil).