LOCAL PARSER · STATEMENTS
BAI2 File Viewer
Inspect BAI2 file, group, account and transaction records with control totals.
● Browser-only processing01 / SOURCE
02 / REPORT
Recent history
Method and formulas
Comma records are identified by BAI2 record code and slash terminator. Counts, account identifiers and stated control totals are surfaced without altering implied-decimal amounts.
Use test or appropriately protected data. Parsing is local, but data can still be visible on your screen and in browser memory.
BAI2 funds type, currency decimals and transaction codes require the sender's specification.
GUIDE
What This Tool Does and When to Use It
The BAI2 File Viewer parses bank administration institute formatted files that banks use to transmit cash position and transaction data. It identifies each comma-delimited record by its two-digit code and slash terminator, then extracts file headers, group headers, account identifiers, transaction details and control totals. Users apply the viewer when they receive BAI2 transmissions from corporate banking platforms and need to confirm record counts, account numbers and stated balances before loading the data into reconciliation systems. All parsing occurs inside the browser so the original file never leaves the local machine, although the content remains visible on screen and in memory until the tab is closed. The tool surfaces implied-decimal amounts exactly as supplied and does not perform currency conversion or alter values.
Worked Example with Realistic Numbers
Consider the supplied sample that begins with record 01 and ends with record 99. The file header lists sender and receiver identifiers, file creation date 260723 and time 1200, followed by a group header that names the ultimate originator and states USD as the currency. The single account record 03 shows account 123456789 with opening available balance 125000. One transaction record 16 carries code 195, amount 4995, funds type S and reference DEMOREF. Control records 49, 98 and 99 report cumulative totals of 120005 with matching record counts. A summary table displays these values side by side with the original record text so users can verify that the account total matches the sum of transactions plus the opening balance.
| Record | Code | Key Fields | Value |
|---|---|---|---|
| File Header | 01 | Date, Time, Record Count | 260723,1200,1 |
| Group Header | 02 | Currency, As-of Date | USD,260723 |
| Account Identifier | 03 | Account, Opening Balance | 123456789,125000 |
| Transaction | 16 | Type, Amount, Funds Type | 195,4995,S |
| Account Trailer | 49 | Control Total, Record Count | 120005,2 |
Formula and Method Table
Record identification follows a fixed pattern: the first two characters after a comma or start of line form the record code, and each record ends with a slash. Control totals are compared directly against the numeric values supplied in trailers 49, 98 and 99 without recalculation of implied decimals. The table below lists inputs accepted by the parser, the unit in which each field is expressed and the output surfaced to the user.
| Input Field | Unit | Output Displayed |
|---|---|---|
| Record code | Two-digit integer | Record type label and description |
| Amount | Integer with implied decimals | Raw value plus note on decimal places |
| Account number | Alphanumeric string | Masked identifier and currency |
| Control total | Integer | Comparison result against counted records |
| Funds type | Single character | Literal code and standard meaning |
Units and Conversions Notes
BAI2 amounts omit decimal points; the number of implied decimal places depends on the currency code stated in the group header. USD and EUR normally require two decimal places while JPY requires zero. The viewer reports the raw integer and reminds the operator to apply the correct divisor according to the sender specification. Transaction codes such as 195 remain unchanged because they represent bank-specific debit or credit types that must be interpreted with the accompanying documentation. Date fields use YYMMDD format and times use HHMM; no automatic conversion to ISO 8601 occurs.
Limitations
The parser does not validate digital signatures or encryption wrappers that sometimes accompany BAI2 files. It cannot infer missing currency decimal rules when the group header omits the currency field. Large files exceeding several thousand records may exceed browser memory limits and produce incomplete tables. Because processing is strictly local, no server-side logging or audit trail is created. Users must still consult the bank’s BAI2 implementation guide for proprietary transaction codes and funds-type meanings.
Common Mistakes
Operators frequently overlook the implied-decimal rule and treat the amount 4995 as 4995.00 instead of 49.95. Another frequent error is assuming record 49 totals include every record inside the account when the trailer only counts transaction and continuation records. Copying the file content from an email client can introduce extra line breaks that break the slash-terminated record structure. Finally, comparing control totals across different currency groups without first confirming the currency code leads to mismatched figures that the viewer correctly flags as inconsistent.
Frequently asked questions
How does the viewer determine the number of implied decimal places for each amount field?
It reads the currency code from the group header record and applies the conventional decimal count for that currency while displaying the raw integer value alongside a reminder note. The operator must confirm the exact rule with the sending bank because some institutions override the standard.
What happens when a control total in record 49 does not match the counted transactions inside an account?
The viewer highlights the discrepancy in the summary table and shows both the stated total and the calculated total so the operator can locate the missing or extra record before further processing.
Which BAI2 record codes are required to appear in every valid transmission?
Every file must contain at least one 01 file header, one 02 group header, one 03 account identifier, one 16 or continuation transaction record, one 49 account trailer, one 98 group trailer and one 99 file trailer.
Can the tool interpret proprietary transaction codes that differ from the published BAI2 standard?
No, it only surfaces the numeric code and reference text exactly as written; interpretation requires the separate implementation guide supplied by the originating bank.
How are multi-currency groups handled when a single file contains both USD and EUR accounts?
Each group header resets the currency context, so the viewer processes amounts separately and displays the applicable decimal note for every account within its group.
What edge case occurs if the final record lacks a terminating slash?
The parser treats the last line as incomplete, omits it from counts and control-total checks, and displays a warning that the file may be truncated or corrupted.
Does the viewer modify any amount values during display?
Amounts remain exactly as supplied with no rounding, scaling or decimal insertion performed by the tool.
Which production check should be performed after the viewer reports matching control totals?
Reconcile the opening and closing balances against the bank’s daily statement and verify that all reference numbers match the expected payment or collection identifiers before importing the data into the treasury system.