---
title: "BAI2 File Format: Record Layouts, Fields & Funds Types"
description: "How a BAI2 file is built: record order, delimiters and 88 continuations, amounts and funds types, control totals, every record layout and validation check."
canonical: https://nacha-navigator.com/bai2-file-format
updated: 2026-10-30
---

# BAI2 file format: records and fields

BAI2 reference

How a BAI2 balance report is put together, field by field: record order, delimiters and continuations, amounts and funds types, control totals, and every check the BAI2 Viewer runs.

Last updated October 30, 2026

[Open the BAI2 Viewer](https://nacha-navigator.com/bai2-viewer) [BAI2 type codes](https://nacha-navigator.com/bai2-type-codes)

## How a BAI2 file is organized

A BAI2 file is plain text, one record per line. Each record starts with a two-digit record code and a comma. The records nest: one file holds one or more groups (the data one bank sends for one as-of date), each group holds the accounts it reports, and each account holds its transactions. The file, every group and every account end with a trailer that carries a control total and a record count.

1. [01 File Header Once, the first record](https://nacha-navigator.com/bai2-file-format#record-01)
2. [02 Group Header Starts each group](https://nacha-navigator.com/bai2-file-format#record-02)
3. [03 Account Identifier Starts each account](https://nacha-navigator.com/bai2-file-format#record-03)
4. [16 Transaction Detail One per transaction, optional](https://nacha-navigator.com/bai2-file-format#record-16)
5. [49 Account Trailer Closes each account](https://nacha-navigator.com/bai2-file-format#record-49)
6. [98 Group Trailer Closes each group](https://nacha-navigator.com/bai2-file-format#record-98)
7. [99 File Trailer Once, the last record](https://nacha-navigator.com/bai2-file-format#record-99)

Indented records repeat: any number of groups per file, accounts per group and transactions per account. An [88 Continuation](https://nacha-navigator.com/bai2-file-format#record-88) can follow any of them to carry fields that did not fit on its line.

## Writing records

Fields have no fixed positions. They are told apart by delimiters, and their order is set by the record layout.

- **Commas separate fields, and a slash ends the record.** Anything after the slash on that line is ignored. The record code counts as field 1.
- **Defaulted fields keep their place.** A field with no value is written as nothing between its delimiters: `,,` in the middle of a record and `,/` at its end. In `02,EXAMPLECO,EXAMPLEBANK,1,261028,2400,,2/` the currency is defaulted, so the group is in USD.
- **The text of a 16 runs to the end of the record.** It is the last field of a Transaction Detail and the only field that may contain commas and slashes, so a 16 with text needs no closing slash. A 16 without text ends with a slash where the text would begin, and text never starts with a slash.
- **An 88 continues the record before it.** When a record is too long for one line, the line ends with a slash and the next line starts `88,` with the record’s next field. Any record can be continued this way, from the 01 to the 99. A field is never split across lines, except the 16 text, which carries on across the 88s. An 88 cannot be the first record or follow a record that already has all its fields.
- **Leading zeros count.** Record codes, type codes and account numbers keep their leading zeros: account 0012345678 is not account 12345678.
- **Record length is free.** Lines are as long as their content unless the File Header sets a Physical Record Length; a record that does not fit continues on 88 lines.

```
16,115,50000,S,30000,20000,0,LBX0001,,LOCKBOX DEPOSIT
88,3 CHECKS, LOCKBOX 4417
```

The 88 adds to the 16’s text, which reads “LOCKBOX DEPOSIT 3 CHECKS, LOCKBOX 4417”.

## Amounts, dates and funds types

- **Amounts have no decimal point.** The currency’s minor unit sets the implied decimals: `1250000` is 12,500.00 in USD, 1,250,000 in JPY (no decimals) and 1,250.000 in BHD (three).
- **Only balances, totals and availability amounts can be negative.** Status (balance) amounts, control totals and the availability amounts of funds types S and D may start with + or -. Summary and transaction amounts are positive (a leading + is allowed but not needed): the [type code](https://nacha-navigator.com/bai2-type-codes) says whether money came in or went out.
- **Currency codes are ISO 4217.** The Group Header sets the currency for its accounts (blank means USD), and an Account Identifier can set another for its own amounts (blank means the group’s).
- **Dates are YYMMDD,** so `261028` is October 28, 2026. The viewer reads a two-digit year below 70 as 20YY.
- **Times are HHMM on a 24-hour clock,** 0000 to 2359; both 2400 and 9999 mean the end of the day. Some banks write HHMMSS or HH:MM, which the viewer reads with a warning.

### Funds types

The funds type says when the money is available. It follows the amount of a Transaction Detail and of each summary in an Account Identifier. A blank funds type means Z.

**BAI2 funds types**

| Code | Availability | Fields after it | Written as |
| --- | --- | --- | --- |
| 0 | Immediate availability | None | 0 |
| 1 | One-day availability | None | 1 |
| 2 | Two-or-more-day availability | None | 2 |
| S | Distributed availability (simple) | Three amounts: available immediately, in one day, and in two or more days | S,30000,20000,0 |
| V | Value dated | Value date (YYMMDD) and value time (HHMM, optional) | V,261030,0900 |
| D | Distributed availability (detailed) | Number of distributions, then days and amount for each distribution | D,2,1,40000,3,10000 |
| Z | Unknown availability | None; also the meaning of a blank funds type | Z |

Availability amounts are in the currency and decimals of the amount they split, may be signed, and need not add up to it. They are not part of any control total. In the D example, 400.00 is available after one day and 100.00 after three.

## Control totals and record counts

Every trailer checks what it closes. Totals are written like any amount, in minor units without a decimal point, and may be negative.

- **Account Trailer (49):** the control total is the sum, with signs, of every amount in the account’s 03 (balances and summaries) and its 16 records, including amounts carried on 88s. Item counts and availability amounts are left out. The record count covers the 03, every 16 and 88, and the 49 itself.
- **Group Trailer (98):** the control total is the sum of the group’s account control totals; then the number of accounts (03 records) and the number of records, from the 02 through the 98, 88s included.
- **File Trailer (99):** the control total is the sum of the group control totals; then the number of groups (02 records) and the number of records in the whole file, from the 01 through the 99.

Some banks leave the 03 summary amounts or the 890 amounts out of the account total, or count only the 16 amounts. The BAI2 Viewer recognizes those totals and reports them as warnings rather than errors (see [Account control total](https://nacha-navigator.com/bai2-file-format#rule-control.account-total)).

## An example, line by line

A complete file with one account: two balances and two summaries, three transactions (one continued on an 88) and the three trailers. Every total and count in it is right; open it in the [BAI2 Viewer](https://nacha-navigator.com/bai2-viewer) by pasting it there.

```
01,EXAMPLEBANK,EXAMPLECO,261029,0615,1029,,,2/
02,EXAMPLECO,EXAMPLEBANK,1,261028,2400,USD,2/
03,0012345678,USD,010,1250000,,,015,1407500,,,100,232500,2,,400,75000,1,/
16,165,182500,0,ACH0001,INV1001,ACH CREDIT, NORTHWIND TRADERS
16,115,50000,S,30000,20000,0,LBX0001,,LOCKBOX DEPOSIT
88,3 CHECKS, LOCKBOX 4417
16,475,75000,,,1043,CHECK 1043
49,3272500,6/
98,3272500,1,8/
99,3272500,1,10/
```

**The example file, explained line by line**

| Line | Record | What it says |
| --- | --- | --- |
| 1 | [01](https://nacha-navigator.com/bai2-file-format#record-01) | File Header: sent by EXAMPLEBANK to EXAMPLECO on October 29, 2026 at 06:15, file number 1029. Physical Record Length and Block Size are defaulted (",,"); the version is 2. |
| 2 | [02](https://nacha-navigator.com/bai2-file-format#record-02) | Group Header: data for EXAMPLECO (ultimate receiver) from EXAMPLEBANK (originator), status 1 (update), as of the end of October 28, 2026 (2400), in USD, final previous-day data (modifier 2). |
| 3 | [03](https://nacha-navigator.com/bai2-file-format#record-03) | Account 0012345678 in USD: opening ledger (010) 12,500.00, closing ledger (015) 14,075.00, total credits (100) 2,325.00 in 2 items and total debits (400) 750.00 in 1 item. Each group of four fields is type code, amount, item count and funds type. |
| 4 | [16](https://nacha-navigator.com/bai2-file-format#record-16) | An ACH credit (165) of 1,825.00, available immediately (funds type 0), with bank and customer references. The text runs to the end of the line, comma included, so there is no "/". |
| 5 | [16](https://nacha-navigator.com/bai2-file-format#record-16) | A lockbox deposit (115) of 500.00 with distributed availability (S): 300.00 today, 200.00 in one day, 0.00 later. The customer reference is defaulted (",,"). |
| 6 | [88](https://nacha-navigator.com/bai2-file-format#record-88) | Continuation: the rest of the 115’s text, which reads “LOCKBOX DEPOSIT 3 CHECKS, LOCKBOX 4417”. |
| 7 | [16](https://nacha-navigator.com/bai2-file-format#record-16) | A paid check (475) of 750.00. The funds type and bank reference are defaulted; the customer reference is the check number. |
| 8 | [49](https://nacha-navigator.com/bai2-file-format#record-49) | Account Trailer: control total 3272500 (32,725.00), the sum of every amount in the 03 (12,500.00 + 14,075.00 + 2,325.00 + 750.00) and the 16s (1,825.00 + 500.00 + 750.00), without the availability amounts or item counts. 6 records: the 03, three 16s, the 88 and the 49. |
| 9 | [98](https://nacha-navigator.com/bai2-file-format#record-98) | Group Trailer: the sum of the group’s account control totals, 1 account, and 8 records (the 02, the account’s 6 and the 98). |
| 10 | [99](https://nacha-navigator.com/bai2-file-format#record-99) | File Trailer: the sum of the group control totals, 1 group, and 10 records: every line of the file. |

## Record layouts

The fields of each record in order, numbered from the record code (field 1); the specification lists them by name. Required fields must have a value; optional fields may be defaulted. The descriptions are the BAI2 Viewer’s.

### 01 File Header

First record of the file: sender, receiver, creation date and time, file ID and format version.

**File Header (01): fields**

| Field | Name | Required | Description |
| --- | --- | --- | --- |
| 1 | Record Code | Yes | 01: File Header, the first record of the file. |
| 2 | Sender Identification | Yes | Who sent the file, usually the bank or its processor. |
| 3 | Receiver Identification | Yes | Who receives the file, usually the customer or its processor. |
| 4 | File Creation Date | Yes | Date the file was created (YYMMDD). |
| 5 | File Creation Time | Yes | Time the file was created (HHMM, 24-hour clock). |
| 6 | File Identification Number | Yes | Number the sender assigns so files created on the same date can be told apart. |
| 7 | Physical Record Length | No | Characters per physical record. Blank means variable-length records. |
| 8 | Block Size | No | Number of physical records in a block. Optional, usually blank. |
| 9 | Version Number | Yes | BAI format version. Must be 2 for BAI2. |

In the example file

```
01,EXAMPLEBANK,EXAMPLECO,261029,0615,1029,,,2/
```

### 02 Group Header

Starts a group of accounts reported by one originator, with the as-of date, time and currency.

**Group Header (02): fields**

| Field | Name | Required | Description |
| --- | --- | --- | --- |
| 1 | Record Code | Yes | 02: Group Header, starts a group of accounts. |
| 2 | Ultimate Receiver Identification | No | Final receiver of the data in this group. Optional. |
| 3 | Originator Identification | Yes | Bank that originated the data in this group, often by its routing number. |
| 4 | Group Status | Yes | 1 Update, 2 Deletion, 3 Correction, 4 Test Only. |
| 5 | As-of-Date | Yes | Date the balances and transactions in this group refer to (YYMMDD). |
| 6 | As-of-Time | No | Time of day the data refers to (HHMM). 2400 or 9999 means end of day. Optional. |
| 7 | Currency Code | No | ISO 4217 currency of the group’s amounts. Blank means USD. |
| 8 | As-of-Date Modifier | No | 1 Interim previous-day, 2 Final previous-day, 3 Interim same-day, 4 Final same-day. Optional. |

In the example file

```
02,EXAMPLECO,EXAMPLEBANK,1,261028,2400,USD,2/
```

### 03 Account Identifier and Summary Status

Starts an account: account number, currency, then balances (status codes) and summaries.

**Account Identifier and Summary Status (03): fields**

| Field | Name | Required | Description |
| --- | --- | --- | --- |
| 1 | Record Code | Yes | 03: Account Identifier and Summary Status, starts an account. |
| 2 | Customer Account Number | Yes | Account number at the originating bank. Leading zeros are significant. |
| 3 | Currency Code | No | ISO 4217 currency of this account. Blank means the group currency. |

Then, for each balance or summary, these four fields. The first group is fields 4 to 7, the next starts at field 8, and so on.

**Account Identifier and Summary Status (03): the fields of each balance or summary**

| Field | Name | Required | Description |
| --- | --- | --- | --- |
| 4 | Type Code | Yes | Status (balance) or summary type code for the amount that follows. |
| 5 | Amount | No | Implied decimals set by the currency. Status amounts may be signed; summary amounts are unsigned. |
| 6 | Item Count | No | Number of items in the summary amount. Blank for status codes. |
| 7 | Funds Type | No | Availability: 0 immediate, 1 one day, 2 two or more days, S distributed, V value dated, D detailed distribution, Z or blank unknown. |

After the Funds Type, [funds types](https://nacha-navigator.com/bai2-file-format#funds-types) S, V and D add fields: S Immediate Availability, One-Day Availability, Two-or-More-Day Availability; V Value Date, Value Time; D Number of Distributions, Availability in Days, Available Amount, the last two repeated for each distribution.

The {type code, amount, item count, funds type} group repeats as often as needed and continues on 88 records.

In the example file

```
03,0012345678,USD,010,1250000,,,015,1407500,,,100,232500,2,,400,75000,1,/
```

### 16 Transaction Detail

One transaction: type code, amount, availability, bank and customer references, and text.

**Transaction Detail (16): fields**

| Field | Name | Required | Description |
| --- | --- | --- | --- |
| 1 | Record Code | Yes | 16: Transaction Detail, one transaction in the account. |
| 2 | Type Code | Yes | Detail type code. Its range sets credit (100–399) or debit (400–699). |
| 3 | Amount | No | Optional; blank means no amount is reported. Unsigned, with implied decimals set by the currency. The type code sets credit or debit. |
| 4 | Funds Type | No | Availability: 0 immediate, 1 one day, 2 two or more days, S distributed, V value dated, D detailed distribution, Z or blank unknown. |
| 5 | Bank Reference Number | No | Reference the bank assigned to the transaction. Optional. |
| 6 | Customer Reference Number | No | Reference from the customer, such as a check number. Optional. |
| 7 | Text | No | Free-form description. Runs to the end of the record, may contain commas, and continues on 88 records. |

After the Funds Type, [funds types](https://nacha-navigator.com/bai2-file-format#funds-types) S, V and D add fields: S Immediate Availability, One-Day Availability, Two-or-More-Day Availability; V Value Date, Value Time; D Number of Distributions, Availability in Days, Available Amount, the last two repeated for each distribution.

Text is the rest of the record, commas included, and continues on 88 records.

In the example file

```
16,165,182500,0,ACH0001,INV1001,ACH CREDIT, NORTHWIND TRADERS
16,115,50000,S,30000,20000,0,LBX0001,,LOCKBOX DEPOSIT
16,475,75000,,,1043,CHECK 1043
```

### 88 Continuation

Carries the rest of the record before it when one line is not enough. Any record type can be continued.

**Continuation (88): fields**

| Field | Name | Required | Description |
| --- | --- | --- | --- |
| 1 | Record Code | Yes | 88: Continuation, carrying the next fields of the record before it. |

Carries the next fields of the record before it, whatever its type. A field is never split across lines; only the 16 text runs on.

In the example file

```
88,3 CHECKS, LOCKBOX 4417
```

### 49 Account Trailer

Closes the account with its control total and record count.

**Account Trailer (49): fields**

| Field | Name | Required | Description |
| --- | --- | --- | --- |
| 1 | Record Code | Yes | 49: Account Trailer, closes the account. |
| 2 | Account Control Total | Yes | Algebraic sum of every amount in the account’s 03 record and all of its 16 records. |
| 3 | Number of Records | Yes | Records in the account: the 03, every 16 and 88, and this 49. |

In the example file

```
49,3272500,6/
```

### 98 Group Trailer

Closes the group with its control total, number of accounts and record count.

**Group Trailer (98): fields**

| Field | Name | Required | Description |
| --- | --- | --- | --- |
| 1 | Record Code | Yes | 98: Group Trailer, closes the group. |
| 2 | Group Control Total | Yes | Sum of the Account Control Totals in the group. |
| 3 | Number of Accounts | Yes | Number of 03 records in the group. |
| 4 | Number of Records | Yes | Records in the group: the 02, every account record and 88, and this 98. |

In the example file

```
98,3272500,1,8/
```

### 99 File Trailer

Last record of the file, with the file control total, number of groups and record count.

**File Trailer (99): fields**

| Field | Name | Required | Description |
| --- | --- | --- | --- |
| 1 | Record Code | Yes | 99: File Trailer, the last record of the file. |
| 2 | File Control Total | Yes | Sum of the Group Control Totals in the file. |
| 3 | Number of Groups | Yes | Number of 02 records in the file. |
| 4 | Number of Records | Yes | Every record in the file from the 01 through this 99, including 88s. |

In the example file

```
99,3272500,1,10/
```

## Group Header codes

The two coded fields of the Group Header. The status is required; the modifier is optional.

### Group Status (02, field 4)

**Group Status (02, field 4)**

| Code | Meaning |
| --- | --- |
| 1 | Update |
| 2 | Deletion |
| 3 | Correction |
| 4 | Test Only |

### As-of-Date Modifier (02, field 8)

**As-of-Date Modifier (02, field 8)**

| Code | Meaning |
| --- | --- |
| 1 | Interim previous-day data |
| 2 | Final previous-day data |
| 3 | Interim same-day data |
| 4 | Final same-day data |

## BAI2 and BTRS (version 3)

BAI2’s successor is the Balance and Transaction Reporting Standard (BTRS), ANSI X9.121, published by ASC X9. A BTRS file uses the same records and delimiters and says Version Number 3 in its File Header. The 2012 edition differs from BAI2 in several ways, among them:

- **Two more records,** 89 Batch Detail and 90 Invoice Detail.
- **More structure in the 88.** An 88 can carry a Fedwire or CHIPS wire’s remittance details, marked with Fedwire/CHIPS tags or ISO 20022 tags.
- **Currency codes are required.** The Group Header and every Account Identifier must name their currency. In BAI2 either may be left blank: USD for a group, the group’s currency for an account.
- **UTF-8 text.** The 16, 88, 89 and 90 records may carry UTF-8 text, including characters outside ASCII.
- **No funds type D.** The detailed distribution is gone; 0, 1, 2, S, V and Z remain.
- **Its own type-code list.** 181 codes in 2012, each tied to a summary code, with some codes renamed or given a new meaning (see [BAI2 and BTRS type codes](https://nacha-navigator.com/bai2-type-codes#btrs)). The current list is version 3.3.1, free from [ANSI](https://webstore.ansi.org/standards/ascx9/ansix91212016r2021).

**Records BTRS adds**

| Code | Record | In the BAI2 Viewer |
| --- | --- | --- |
| 89 | Batch Detail | Shown as raw text with a note; its fields are not decoded. |
| 90 | Invoice Detail | Shown as raw text with a note; its fields are not decoded. |

The viewer opens version 3 files with BAI2 layouts and code meanings, and warns that some meanings differ. The record layouts and checks on this page are BAI2’s.

## Validation checks

The 53 checks the BAI2 Viewer runs on every file, with the code it shows for each. An error breaks a rule of the format, such as a control total that does not add up; a warning is something a strict reader may reject, though the file still reads; info is worth knowing but harmless. Some checks are reported at more than one severity, depending on what was found.

Each check’s last line names the part of the specification it comes from, with field numbers counted from the record code as in the layouts above. The viewer reads files leniently, accepting a few common deviations with a warning where a strict reading would report an error.

### File and record format

Whether the file reads as BAI2 at all, and how each line is written.

1. #### Empty file

   Error `format.empty`

   The file holds no records, only nothing or blank lines, so there is nothing to show.

   Specification: BAI2 file structure: 01 … 99.
2. #### Not a BAI2 file

   Error `format.not-bai2`

   The first line does not start with a BAI2 record code and fewer than half of the lines do, so the file is not read as BAI2. A NACHA, CSV or X9 file ends here.

   Specification: BAI2 record codes 01, 02, 03, 16, 49, 88, 98, 99.
3. #### Character encoding

   Info `format.encoding`

   The file is EBCDIC (code page 037) or UTF-16 rather than ASCII text; it was converted to text before reading.

   Specification: BAI2 files are ASCII text.
4. #### Blank lines

   Info `format.blank-lines`

   Blank lines between records were skipped. BAI2 has no blank records, but they change nothing else.

   Specification: BAI2 physical records.
5. #### Leading whitespace

   Warning `format.leading-whitespace`

   Lines start with spaces before the record code. The viewer reads from the record code; a stricter reader may reject the line.

   Specification: BAI2 physical records start with the record code.
6. #### Non-ASCII characters

   Info `format.non-ascii`

   Some lines contain characters outside printable ASCII, such as accented letters or control characters.

   Specification: BAI2 files are ASCII text.
7. #### No line breaks

   Error Info `format.no-line-breaks`

   The file has no line breaks. When it divides into records of the Physical Record Length in the File Header (or of 80 characters), it is split that way and noted; when it does not, it reads as one long record, which is an error.

   Specification: 01 File Header, field 7 Physical Record Length.
8. #### Record longer than declared

   Warning `format.record-length`

   Lines are longer than the Physical Record Length the File Header declares, or the declared length is shorter than the header itself.

   Specification: 01 File Header, field 7 Physical Record Length.
9. #### Unknown record code

   Error `format.unknown-record`

   A line starts with a code that is not a BAI2 record code (01, 02, 03, 16, 49, 88, 98 or 99). It is kept as raw text.

   Specification: BAI2 record codes 01, 02, 03, 16, 49, 88, 98, 99.
10. #### BTRS record

    Info `format.btrs-record`

    A BTRS record (89 Batch Detail or 90 Invoice Detail) in a version 3 file. The viewer reads BAI2 layouts, so it is shown as raw text.

    Specification: BTRS (ANSI X9.121, version 3) records 89 Batch Detail and 90 Invoice Detail.
11. #### Record code not followed by a comma

    Error `format.record-code-delimiter`

    The two-digit record code is not followed by a comma, as in "16;165,…".

    Specification: BAI2 field delimiters.
12. #### Record not ended with "/"

    Warning `format.missing-terminator`

    A record other than a Transaction Detail does not end with "/". The 16 is the exception because its text runs to the end of the record.

    Specification: BAI2 field delimiters: "/" ends a record.
13. #### Data after "/"

    Warning `format.data-after-terminator`

    Characters follow the "/" that ends a record. BAI2 ignores everything after the slash, and so does the viewer.

    Specification: BAI2 field delimiters: "/" ends a record.
14. #### Fields beyond the record layout

    Warning `format.extra-fields`

    A record has more non-empty fields than its layout defines. The extra fields are shown but ignored.

    Specification: BAI2 record formats.
15. #### Version number

    Warning `format.version`

    The Version Number in the File Header is not 2. Version 3 marks a BTRS file, read with BAI2 code meanings; any other version is read as BAI2.

    Specification: 01 File Header, field 9 Version Number (2).
16. #### Issue limit reached

    Info `format.issue-limit`

    The file has more issues than the viewer lists (5,000); the rest are counted but not shown.

    A limit of the viewer, not a rule of the format.
17. #### Too many lines

    Error `format.too-many-lines`

    The file has more lines than the viewer opens (500,000), so it is not read.

    A limit of the viewer, not a rule of the format.

### File structure

Whether the records nest as 01, groups, accounts, trailers and 99.

1. #### File does not start with 01

   Error `structure.first-record`

   The first record is not a File Header (01).

   Specification: BAI2 file structure: 01 is the first record.
2. #### No Group Header

   Error `structure.no-group`

   The file has no Group Header (02), so no account belongs to a group.

   Specification: BAI2 file structure: 01 { 02 … 98 } 99.
3. #### Second File Header

   Error `structure.duplicate-file-header`

   A second File Header (01) appears inside the file. Two files may have been joined together.

   Specification: BAI2 file structure: one 01 per file.
4. #### Record out of order

   Error `structure.unexpected-record`

   A record is out of place: an 03 outside a group, a 16 outside an account, or a 49 or 98 with no open account or group to close.

   Specification: BAI2 file structure: 01 { 02 { 03 16\* 49 }\* 98 }\* 99.
5. #### Missing Account Trailer

   Error `structure.missing-account-trailer`

   An account (03) is not closed by an Account Trailer (49) before the next account, the group trailer or the end of the file.

   Specification: 49 Account Trailer closes every 03.
6. #### Missing Group Trailer

   Error `structure.missing-group-trailer`

   A group (02) is not closed by a Group Trailer (98) before the next group or the end of the file.

   Specification: 98 Group Trailer closes every 02.
7. #### Missing File Trailer

   Error `structure.missing-file-trailer`

   The file does not end with a File Trailer (99).

   Specification: 99 File Trailer is the last record.
8. #### Records after the File Trailer

   Error `structure.after-file-trailer`

   Records follow the File Trailer (99). They are not part of the file; if the first is another 01, two files may have been joined.

   Specification: 99 File Trailer is the last record.
9. #### Continuation with nothing to continue

   Error `structure.orphan-continuation`

   An 88 has nothing to continue: it is the first record, or the record before it already has all its fields. If it looks like a group trailer, the message asks whether 98 was meant.

   Specification: 88 Continuation carries the next fields of the record before it.
10. #### 88 used as a Group Trailer

    Warning `structure.legacy-88-group-trailer`

    An 88 written where the Group Trailer belongs, as some older software does, after a complete 49 or 02. The viewer reads it as a 98; in BAI2, 88 only continues a record.

    Specification: 98 Group Trailer; 88 is Continuation.
11. #### "/" inside an 03 summary

    Warning `structure.slash-mid-summary`

    A "/" ends an 03 line partway through a summary, and the 88 that follows starts with a type code. The viewer treats the rest of that summary as defaulted and the 88 as the next summary, which is what such files mean.

    Specification: 03 Account Identifier and Summary Status; 88 Continuation.

### Field values

Dates, times, amounts, counts and codes in individual fields.

1. #### Required field missing

   Error `field.required`

   A field the layout requires is empty, such as the Originator Identification in an 02 or a trailer’s control total.

   Specification: BAI2 record formats.
2. #### Invalid date

   Error `field.date`

   A date is not a real YYMMDD date: it has the wrong length, month 13, or a day the month does not have.

   Specification: BAI2 dates are YYMMDD.
3. #### Invalid time

   Error `field.time`

   A time is not a valid HHMM time: 0000 to 2359, or 2400 or 9999 for the end of the day.

   Specification: BAI2 times are HHMM, 0000–2400 (9999 = end of day).
4. #### Non-standard time format

   Warning `field.time-format`

   A time is written as HHMMSS or HH:MM. It is read, but BAI2 times are four digits.

   Specification: BAI2 times are HHMM.
5. #### Not a whole number

   Error Warning `field.numeric`

   A number field (an item count, a record, account or group count, or a funds type D count) holds something other than digits. It is a warning for the File Identification Number, Physical Record Length and Block Size in the 01, and an error everywhere else.

   Specification: BAI2 numeric fields.
6. #### Invalid amount

   Error `field.amount`

   An amount is not digits with an optional sign, for example 1250.00: BAI2 amounts have no decimal point.

   Specification: BAI2 amounts: digits with implied decimals, optional sign.
7. #### Negative unsigned amount

   Error `field.amount-sign`

   A summary or transaction amount is negative. Those amounts are positive (a leading + is allowed); the type code says whether it is a credit or a debit.

   Specification: 03 summary and 16 amounts are unsigned; the type code sets the direction.
8. #### Currency code

   Error Warning Info `field.currency`

   A currency code is not an ISO 4217 code (an error; its amounts are shown with 2 decimals), is lowercase (a warning when read leniently, else an error), or is a withdrawn code (info).

   Specification: 02 field 7 / 03 field 3: ISO 4217 currency code.
9. #### Group Status

   Error `field.group-status`

   The Group Status in an 02 is not 1, 2, 3 or 4.

   Specification: 02 Group Header, field 4: 1, 2, 3 or 4.
10. #### As-of-Date Modifier

    Error `field.as-of-modifier`

    The As-of-Date Modifier in an 02 is not 1, 2, 3 or 4.

    Specification: 02 Group Header, field 8: 1, 2, 3 or 4.
11. #### Funds Type

    Error Warning `field.funds-type`

    A funds type is not 0, 1, 2, S, V, D or Z (an error), or is a lowercase letter (a warning when read leniently, else an error).

    Specification: Funds Type: 0, 1, 2, S, V, D or Z.
12. #### Availability fields

    Error `field.availability`

    Funds type D says more distributions follow than the record holds.

    Specification: Funds Type S (3 amounts), V (date, time), D (count, days/amount pairs).
13. #### Item count on a status code

    Info `field.status-item-count`

    An item count is given with a status (balance) code in an 03. Item counts belong to summary codes.

    Specification: 03 Item Count applies to summary type codes.
14. #### Funds type on a status code

    Info `field.status-funds-type`

    A funds type is given with a status (balance) code in an 03. Funds types belong to summary codes.

    Specification: 03 Funds Type applies to summary type codes.

### Type codes

Whether each type code is valid and in the right record.

1. #### Invalid type code

   Error `code.type-code`

   A type code is not three digits from 001 to 999.

   Specification: BAI2 type codes are 3 digits.
2. #### Type code in the wrong record

   Error Warning Info `code.type-code-level`

   A type code is in the wrong record: a status code in a 16 is an error, a detail code in an 03 a warning, and a summary code in a 16 worth a note.

   Specification: 03 carries status/summary codes; 16 carries detail codes.
3. #### Unrecognized type code

   Info `code.type-code-unrecognized`

   A three-digit code that is neither in the list nor in a bank-defined range (900 to 999). It is described by its range; ask the bank what it means.

   Specification: BAI2 type-code list.

### Control totals and counts

The totals and record counts in the 49, 98 and 99 trailers.

1. #### Account control total

   Error Warning `control.account-total`

   The 49 Account Control Total is not the sum of every amount in the account’s 03 and 16 records. It is a warning when the total matches a way some banks add up (without the 03 summaries, without 890 amounts, or the 16 amounts alone).

   Specification: 49 Account Trailer, field 2 Account Control Total.
2. #### Account record count

   Error `control.account-records`

   The 49 Number of Records does not count the account’s records: its 03, every 16 and 88, and the 49 itself.

   Specification: 49 Account Trailer, field 3 Number of Records.
3. #### Group control total

   Error `control.group-total`

   The 98 Group Control Total is not the sum of the group’s Account Control Totals.

   Specification: 98 Group Trailer, field 2 Group Control Total.
4. #### Group account count

   Error `control.group-accounts`

   The 98 Number of Accounts does not match the number of 03 records in the group.

   Specification: 98 Group Trailer, field 3 Number of Accounts.
5. #### Group record count

   Error `control.group-records`

   The 98 Number of Records does not count the group’s records: its 02, every account record and 88, and the 98 itself.

   Specification: 98 Group Trailer, field 4 Number of Records.
6. #### File control total

   Error `control.file-total`

   The 99 File Control Total is not the sum of the Group Control Totals.

   Specification: 99 File Trailer, field 2 File Control Total.
7. #### File group count

   Error `control.file-groups`

   The 99 Number of Groups does not match the number of 02 records in the file.

   Specification: 99 File Trailer, field 3 Number of Groups.
8. #### File record count

   Error `control.file-records`

   The 99 Number of Records does not count every record from the 01 through the 99, 88s included.

   Specification: 99 File Trailer, field 4 Number of Records.

## Sources

This page follows BAI’s Cash Management Balance Reporting Specifications, Version 2 (2005), in our own words, and describes how the BAI2 Viewer applies it. Banks differ in the details, so check your bank’s BAI2 guide for its record lengths, codes and conventions.

Type code names come from a list adapted from [ministryofjustice/bai2](https://github.com/ministryofjustice/bai2) (MIT License). NACHA Navigator is independent and not affiliated with BAI or ASC X9. This page is for information only and is not legal or compliance advice.

[BAI2 specification (PDF)](https://cdn.bai.org/migrated-from-www/docs/default-source/libraries/site-general-downloads/cash_management_2005.pdf) [Sample BAI2 file](https://nacha-navigator.com/samples/bai2/sample-multi-account.bai) [All sample files](https://nacha-navigator.com/sample-files)
