TOPIC 24/2612 MINNOT STARTED

Reading a balance reporting file line by line: records, control totals and type codes

A balance reporting file looks like noise until you know the line types. Learn how the boxes open and close, how control totals catch a damaged file, and what the type codes mean.

L1–L4 are part of the Pro pass

L0 Explain simply

Every morning Bank Alfa sends Asha Traders a plain text file. Everything in this story is SYNTHETIC / TRAINING ONLY. Maya Chen opens it and sees lines that start with numbers such as 01, 02, 03, 16, 49, 98 and 99. It looks like noise, but it is carefully ordered.

The file is a bank statement written for a computer. Its format is called , a layout first published by the Bank Administration Institute and still sent by many banks. The first number on each line says what kind of line it is.

The lines open things and then close them, like a set of boxes. A file holds groups, a group holds accounts, and an account holds the transaction lines. Each box has a closing line that carries totals.

Those totals are the clever part. They let the receiver check that no line was lost on the way. A file whose counts do not match is a damaged file, and a damaged file is a reason to stop and ask, not to post.

Once you know the line types, a BAI2 file reads like a tidy parcel, not like noise.

PICTURE IT

Nested boxes with a packing slip on each lid

A courier delivers a large box. Inside are smaller boxes, and inside each of those are envelopes. Every box and envelope has a lid with a packing slip that says how many items are inside and what they add up to. The receiver opens the boxes from the outside in and checks each slip against what is there.

THE REAL JOB A BAI2 file nests file, group and account, and each closing line carries a total and a count.

  1. The file opens
  2. A group opens
  3. An account opens with its balances
  4. Transactions follow
  5. Each closing line carries a total
From outer box to checked slip

HOW THE PICTURE MAPS

How each part of the picture matches the payment
In the pictureIn the payment
The large outer boxThe file, opened by 01 and closed by 99
A smaller box inside itA group, opened by 02 and closed by 98
An envelope inside thatAn account, opened by 03 and closed by 49
Each item in the envelopeA transaction on a 16 line
The packing slip on each lidThe control total and record count

WHERE THIS PICTURE STOPS

  • A packing slip is written by a person. A control total is worked out by software and checked by software.
  • The picture has one kind of box at each level. Guides disagree on whether a file holds one group or several.
  • Matching counts and totals cannot prove file identity or authenticity: equal offsetting substitutions can preserve both. Currency/profile, not an absent point, determines implied decimals.

HOOK

Check the slip before you open the next box.

TELL A FRIEND

A BAI2 file nests file, group and account, and each closing line carries a total and a count. A difference means the file may be damaged, so hold it.

OFTEN MIXED UP WITH The format your bank reports back in (BAI2, MT940, camt.053). That lesson compares three statement formats and what each is for. This one reads one of them, BAI2, line by line and shows how it checks itself.

PRACTISE AND KEEP

Sources for this topic — 11 sources
  1. Market practice

    Bank Administration Institute format 2 (BAI2) statement format (Westpac BankRec documentation) ↗ — Westpac · Record sequence and a single group per file search excerpt, page not opened

    A bank's developer documentation page describing the Bank Administration Institute format 2 (BAI2) statement format it provides.

    Cited for two points only. The record sequence is 01, 02, 03, 16, 49, 98, 99, with 88 as a continuation. This bank's file holds a single group, starting with 02 and ending with 98.

    Not cited for any other bank's layout. · Checked 2026-10-12

    Verified from web-search excerpts on the access date; the page was not opened. Another bank's guide in the same results said a file can hold several groups. Use only the label market-practice from an excerpt-only source.

  2. Market practice

    Bank Administration Institute format 2 (BAI2) reporting reference guide (East West Bank) ↗ — East West Bank · Structure, control totals and implied decimal places search excerpt, page not opened

    A bank's reference guide for the Bank Administration Institute format 2 (BAI2) reports it provides to business customers.

    Cited for three points only. Records 49, 98 and 99 close the account, group and file with control totals. The account control total is the sum of the amounts in the 03 and 16 records, and record counts include the records in the box. Amounts are written without a decimal point.

    Not cited for other banks' layouts. · Checked 2026-10-12

    Verified from web-search excerpts on the access date; the file was not opened. A second East West Bank file in the same results agreed. Use only the label market-practice from an excerpt-only source.

  3. Market practice

    Account information file in the Bank Administration Institute format 2 (BAI2) (National Australia Bank guide) ↗ — National Australia Bank · Amount format search excerpt, page not opened

    A bank's guide to the account information file it provides in Bank Administration Institute format 2 (BAI2) form.

    Cited for one point only. Amounts carry two decimal places with no decimal point written.

    Not cited for any other bank's layout or for sign placement. · Checked 2026-10-12

    Verified from web-search excerpts on the access date; the file was not opened. Use only the label market-practice from an excerpt-only source.

  4. Market practice

    Checks made by a Bank Administration Institute format 2 (BAI2) file reader (NetSuite help) ↗ — Oracle NetSuite · Reader program checks of totals and counts search excerpt, page not opened

    A software vendor's help page that lists the checks its Bank Administration Institute format 2 (BAI2) reader program makes.

    Cited for one point only. The reader program works the account, group and file control totals out again and checks that counts match the records present.

    Not cited for the BAI2 specification itself. · Checked 2026-10-12

    Verified from web-search excerpts on the access date; the page was not opened. Use only the label market-practice from an excerpt-only source.

  5. Market practice

    Bank Administration Institute format 2 (BAI2) transaction detail type codes (International Business Machines documentation) ↗ — IBM · Type code ranges search excerpt, page not opened

    A software vendor's documentation of the type code field of a Bank Administration Institute format 2 (BAI2) transaction detail record.

    Cited for one point only. Codes are grouped by range, with credits generally from 100 to 399 and debits generally from 400 to 699.

    Not cited for the meaning of any one code on another bank's list. · Checked 2026-10-12

    Verified from web-search excerpts on the access date; the page was not opened. A bank's code sheet in the same results agreed on the ranges. Use only the label market-practice from an excerpt-only source.

  6. Market practice

    ANSI X9.121 — Balance and Transaction Reporting Standard (BTRS) ↗ — Accredited Standards Committee X9, Inc. (ASC X9), published through ANSI · Ownership and the successor standard search excerpt, page not opened

    BAI2's standards successor, and the reason a reader must not treat BAI2 as an unowned legacy format. Cited for the stewardship story only: that BAI2's copyright passed to ASC X9, that X9 published a successor standard under the designation X9.121. And that the successor was written for backwards compatibility with BAI2 rather than as a replacement format banks had to move to at once. · Checked 2026-08-16

    x9.org could not be fetched, confirmed by direct probe on the access date, as did the copies of the standard and its format guide hosted at x9.org and at minneapolisfed.org. The document was NOT opened. Every claim this entry supports was corroborated across two independent web searches whose result content named the designation, the committee and the backwards-compatibility intent. No clause, field or code value is quoted from it, and no version number is asserted here. The version in force is carried as a dated fact in content/standards/current-facts.json, so it can be rechecked.

  7. Market practice

    moov-io/bai2 — a reader, writer and validator for the BAI2 format ↗ — The Moov Authors (open source, Apache 2.0) · Specification named by an open implementation search excerpt, page not opened

    A third open implementation, cited here for one thing only: it independently names the specification this format is written to — the Cash Management Balance Reporting Specifications Version 2, developed by the Bank Administration Institute — and links the publisher. It is the second of the two independent attestations of that document's identity. · Checked 2026-08-16

    Only README.md was read, at raw.githubusercontent.com on the access date at the master branch. Its Go source was not: this session could not enumerate the repository tree (the GitHub API and codeload both refused, and probed raw paths returned 404). So nothing about the field layout is taken from it and it backs up no position. Listed rather than omitted because the identity claim it supports is the one claim on this page that a blocked publisher would otherwise leave resting on search excerpts alone.

  8. Market practice

    X9 edition of the Bank Administration Institute version 2 manual (2009), preview pages on the American National Standards Institute web store ↗ — Accredited Standards Committee X9, Inc., via the American National Standards Institute web store · Who owns the version 2 manual now; search excerpt, page not opened

    The preview pages of the X9 edition of the Bank Administration Institute version 2 manual.

    Cited for one point as a search excerpt describes it: the copyright moved from the Bank Administration Institute to X9 as of 24 June 2009, and X9 then started a project to make version 2 an American National Standard.

    Not cited for any record layout, field width or code value. · Checked 2026-10-12

    Known from web-search excerpts on the access date, page not opened. The publisher's own domain cannot be fetched from the authoring environment, so nothing is quoted from the page itself. One other summary dated the copyright transfer to 2008, so the year is stated as this preview gives it.

  9. Market practice

    New Transaction Codes and Format to Support The Clearing House Real-Time Payments ↗ — Accredited Standards Committee X9, Inc. · Codes added for real-time payments; search excerpt, page not opened

    An X9 document adding transaction codes to the balance and transaction reporting format for real-time payments.

    Cited for one point as a search excerpt describes it: detail codes 158 and 458 stand for the credit and debit transactions, and summary codes 159 and 459 for the credit and debit totals.

    Not cited for the full code list or any field layout. · Checked 2026-10-12

    Known from web-search excerpts on the access date, page not opened. The publisher's own domain cannot be fetched from the authoring environment, so nothing is quoted from the page itself.

  10. Simplified educational illustration

    Payments Signal editorial teaching models — Payments Signal · Asha Traders, Bank Alfa and Maya Chen are invented; the boxes picture and Maya's step order are this site's frame.

    This site's own simplified teaching models. · Checked 2026-07-12

    What this simplifies: The original specification was not reached; guides disagree on groups per file, sign placement and release date.

    Used wherever diagrams, scenarios, figures, or example values are didactic constructions rather than sourced facts; every such use carries a simplifications disclosure. All people, companies, banks, and list entries in examples are fictional.

  11. Implementation-specific0.5alpha; copyright 2003

    ScotiaConnect BAI2 Export File Specification ↗ — Scotiabank · Historical ScotiaConnect version 0.5alpha pp.10–13: currency determines implied decimals; opened bank guide

    Historical bank-specific BAI2 profile, pp.10–13 currency-dependent implied decimals. Not a current universal X9 rule. · Checked 2026-11-06

    Opened primary PDF after normal web search. Its profile defaults and supported funds types are not generalised to other banks.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.