2.4 Batch Control (Type 8), File Control (Type 9) & Entry Hash Calculations

Key Takeaways

  • The Batch Control Record (Type 8) and File Control Record (Type 9) seal the transmission envelopes and provide mathematical verification of data integrity.
  • The Batch Entry Hash is calculated by summing the 8-digit Receiving DFI routing numbers of all Type 6 records in the batch, retaining only the rightmost 10 digits upon overflow (Modulo 10^10).
  • The File Entry Hash is calculated by summing the 10-digit Entry Hashes of all Type 8 records in the file, truncating any overflow beyond 10 digits to the rightmost 10 digits.
  • The Block Count in the Type 9 record is calculated as ceil(Total Active Records / 10), accounting for headers, batches, controls, and any trailing nines padding records.
  • ACH Operators execute immediate automated balance validation of entry counts, debit/credit totals, and entry hashes upon ingestion; any discrepancy triggers fatal batch or file rejection.
Last updated: August 2026

2.4 Batch Control (Type 8), File Control (Type 9) & Entry Hash Calculations

Control records serve as the cryptographic and arithmetic seals of the ACH Network. Without control records, electronic transmission errors, dropped packets, or fraudulent record injections could silently corrupt banking ledgers.

The Company/Batch Control Record (Type 8) summarizes and seals individual batches, while the File Control Record (Type 9) summarizes and seals the entire ACH file. ACH Operators execute strict, automated balance checks against these records before routing transactions for clearing.


Field-by-Field Specification: Batch Control Record (Type 8)

FieldPositionsLengthTypeNameContents / Validation Rules
101–011NRecord Type CodeMandatory constant 8. Identifies record as Batch Control.
202–043NService Class CodeMust identically match Field 2 of corresponding Type 5 record (200, 220, 225, 280).
305–106NEntry / Addenda CountTotal count of all Type 6 Entry Detail records PLUS all Type 7 Addenda records in this batch.
411–2010NEntry HashCalculated 10-digit sum of all 8-digit Receiving DFI routing numbers in this batch (truncated to 10 digits).
521–3212NTotal Debit Entry Dollar AmountSum of all debit amounts in batch, in cents, zero-padded (12-digit amount in cents).
633–4412NTotal Credit Entry Dollar AmountSum of all credit amounts in batch, in cents, zero-padded (12-digit amount in cents).
745–5410A/NCompany IdentificationMust identically match Positions 41–50 of corresponding Type 5 record.
855–7319A/NMessage Authentication Code (MAC)Optional 19 characters. Security authentication code for high-value/governmental files (usually blank).
974–796A/NReserved6 blank spaces ( ). Reserved for future Nacha use.
1080–878NOriginating DFI IdentificationMust identically match Positions 80–87 of corresponding Type 5 record.
1188–947NBatch NumberMust identically match Positions 88–94 of corresponding Type 5 record.

Field-by-Field Specification: File Control Record (Type 9)

FieldPositionsLengthTypeNameContents / Validation Rules
101–011NRecord Type CodeMandatory constant 9. Identifies record as File Control.
202–076NBatch CountTotal number of Type 5 records (batches) contained in the entire file.
308–136NBlock CountTotal number of 10-record physical blocks in the file, including headers, controls, and nines padding.
414–218NEntry / Addenda CountTotal cumulative count of all Type 6 and Type 7 records across all batches in the file.
522–3110NEntry HashSum of the 10-digit Entry Hashes from all Type 8 records, truncated to rightmost 10 digits.
632–4312NTotal Debit Dollar Amount in FileTotal cumulative sum of all debits in the file, in cents, zero-padded (12-digit amount in cents).
744–5512NTotal Credit Dollar Amount in FileTotal cumulative sum of all credits in the file, in cents, zero-padded (12-digit amount in cents).
856–9439A/NReserved39 blank spaces. Reserved for future Nacha use.

Mathematical Mechanics of the Entry Hash

The Entry Hash is a critical mathematical checksum designed to detect corrupted, missing, transposed, or injected routing numbers during data transmission.

Batch Entry Hash Algorithm

  1. For every Type 6 Entry Detail Record in the batch, extract the 8-digit Receiving DFI Identification (Positions 04–11). Do NOT include the 9th check digit (Position 12).
  2. Add all 8-digit routing numbers together using standard arithmetic addition.
  3. If the sum is 10 or fewer digits, format the result with leading zeros to fill exactly 10 character positions.
  4. The 10-Digit Overflow Truncation Rule: If the sum exceeds 10 digits (i.e., reaches 10,000,000,000 or greater), truncate the leftmost overflowing digits and retain only the rightmost (least significant) 10 digits (Modulo $10^{10}$).

Batch Entry Hash=(i=1NType 6RDFI Routingi)mod1010\text{Batch Entry Hash} = \left( \sum_{i=1}^{N_{\text{Type 6}}} \text{RDFI Routing}_{i} \right) \bmod 10^{10}

File Entry Hash Algorithm

To compute the Entry Hash for the Type 9 File Control record, sum the 10-digit Entry Hash values of every Type 8 Batch Control record in the file, applying the same 10-digit rightmost truncation rule:

File Entry Hash=(j=1NBatchesBatch Hashj)mod1010\text{File Entry Hash} = \left( \sum_{j=1}^{N_{\text{Batches}}} \text{Batch Hash}_{j} \right) \bmod 10^{10}


Step-by-Step Worked Mathematical Examples

Scenario 1: Standard Batch Calculation (No Overflow)

An ODFI batches 4 payroll credit entries (PPD, Service Class Code 220):

  • Entry 1: RDFI Routing 071000013 (Pos 04–11 = 07100001), Amount = $1,500.00 (0000150000 in cents)
  • Entry 2: RDFI Routing 121000358 (Pos 04–11 = 12100035), Amount = $2,250.50 (0000225050 in cents)
  • Entry 3: RDFI Routing 021000021 (Pos 04–11 = 02100002), Amount = $875.25 (0000087525 in cents)
  • Entry 4: RDFI Routing 091000019 (Pos 04–11 = 09100001), Amount = $3,100.00 (0000310000 in cents)

Calculations:

  1. Entry Count: 4 Type 6 records + 0 Type 7 records = 000004 (Pos 05–10)
  2. Debit Dollar Total: 000000000000 ($0.00 in cents, Pos 21–32)
  3. Credit Dollar Total: 150,000+225,050+87,525+310,000=772,575 cents=000000772575 (Pos 33–44)150,000 + 225,050 + 87,525 + 310,000 = 772,575 \text{ cents} = \mathbf{000000772575} \text{ (Pos 33–44)}
  4. Batch Entry Hash: Sum=07100001+12100035+02100002+09100001=30,410,039\text{Sum} = 07100001 + 12100035 + 02100002 + 09100001 = 30,410,039 10-Digit Zero-Padded Hash=0030410039 (Pos 11–20)\text{10-Digit Zero-Padded Hash} = \mathbf{0030410039} \text{ (Pos 11–20)}

Scenario 2: High-Volume Commercial Batch (With 10-Digit Overflow)

A large corporate origination batch contains 250,000 debit entries. Standard addition of all 250,000 8-digit routing numbers produces: Raw Arithmetic Sum=18,459,283,741,290 (14 Digits)\text{Raw Arithmetic Sum} = \mathbf{18,459,283,741,290} \text{ (14 Digits)}

Truncation Calculation:

  1. Identify the rightmost 10 digits: 9283741290.
  2. Discard the 4 leftmost overflowing digits (1845).
  3. Value placed in Positions 11–20 of Type 8: 9283741290.

Scenario 3: Multi-Batch File Control Accumulation

Suppose an ACH file contains two batches:

  • Batch 1 (Scenario 1): Batch Hash = 0030410039, Debits = $0.00 (000000000000), Credits = $7,725.75 (000000772575), Entry Count = 4
  • Batch 2 (Scenario 2): Batch Hash = 9283741290, Debits = $14,500,000.00 (001450000000), Credits = $0.00 (000000000000), Entry Count = 250,000

File Control (Type 9) Field Values:

  • Batch Count (Pos 02–07): 000002 (2 batches)
  • Entry / Addenda Count (Pos 14–21): 00250004 (250,004 total detail records)
  • Total Debit Dollar Amount (Pos 32–43): 001450000000 ($14,500,000.00 in cents)
  • Total Credit Dollar Amount (Pos 44–55): 000000772575 ($7,725.75 in cents)
  • File Entry Hash (Pos 22–31): Sum=0030410039+9283741290=9314151329 (Pos 22–31)\text{Sum} = 0030410039 + 9283741290 = \mathbf{9314151329} \text{ (Pos 22–31)}

Block Count Calculation Formula

The Block Count field (Positions 08–13 of Type 9) verifies that physical blocks were not truncated during transmission.

Total Logical Records=NType 1+NType 5+NType 6+NType 7+NType 8+NType 9+NType 99\text{Total Logical Records} = N_{\text{Type 1}} + N_{\text{Type 5}} + N_{\text{Type 6}} + N_{\text{Type 7}} + N_{\text{Type 8}} + N_{\text{Type 9}} + N_{\text{Type 99}} Block Count=Total Logical Records10=Active Records (Types 1–9)10\text{Block Count} = \frac{\text{Total Logical Records}}{10} = \lceil \frac{\text{Active Records (Types 1–9)}}{10} \rceil

Worked Example: Block Count

In our two-batch file above:

  • 1 File Header (Type 1)
  • 2 Batch Headers (Type 5)
  • 250,004 Entry Details (Type 6)
  • 0 Addenda Records (Type 7)
  • 2 Batch Controls (Type 8)
  • 1 File Control (Type 9)

Active Records=1+2+250,004+0+2+1=250,010 records\text{Active Records} = 1 + 2 + 250,004 + 0 + 2 + 1 = 250,010 \text{ records} Block Count=250,01010=25,001 blocks (Value in Pos 08–13 = ‘025001‘)\text{Block Count} = \frac{250,010}{10} = \mathbf{25,001} \text{ blocks (Value in Pos 08–13 = `025001`)} Since 250,010 is an exact multiple of 10, zero nines padding records are required.

Loading diagram...
ACH Control Accumulation & Operator Integrity Verification
Test Your Knowledge

An ACH batch contains three Entry Detail records with the following RDFI routing numbers: 071000013, 121000358, and 021000021. What is the correct 10-digit Entry Hash to be populated in Positions 11–20 of the Batch Control Record (Type 8)?

A
B
C
D
Test Your Knowledge

If the arithmetic sum of the 8-digit Receiving DFI routing numbers in a high-volume ACH batch equals 14,892,345,678, what Entry Hash value is placed in the Type 8 Batch Control record?

A
B
C
D
Test Your Knowledge

An ACH file contains 1 File Header, 1 Batch Header, 42 Entry Detail Records, 0 Addenda Records, 1 Batch Control, and 1 File Control record. What is the correct Block Count reported in Positions 08–13 of the File Control Record (Type 9)?

A
B
C
D
Test Your Knowledge

What action does an ACH Operator take if the calculated sum of credit amounts in an ACH batch does not match the Total Credit Entry Dollar Amount in Positions 33–44 of the Type 8 Batch Control Record?

A
B
C
D