Error messages / NACHA file validator
The block count does not match
What the validator shows
This is the finding for the sample file nacha-error-block-count.ach:
- ErrorThe block count does not matchLine 12 · File Control (9) · Block Count · positions 8-13
- Expected
- 000002 (12 records, 10 per block, rounded up)
- Found
- 000001
9000002000001000000060495000079000000048000000001744575·······································
Spaces are shown as dots so that they can be counted.
A message of the NACHA file validator, reported as an error. How the block count in a NACHA File Control record is calculated, what the blocking factor of 10 means, and how 9-padding fits in.
Blocks of ten records
NACHA files are counted in blocks of ten records (the blocking factor 10 in positions 38-39 of the File Header). The File Control record (type 9) states the number of blocks in positions 8-13.
The count is: all records in the file, from the File Header to the File Control record inclusive, divided by ten and rounded up. A file of 12 records is 2 blocks; a file of 20 records is also 2 blocks; a file of 21 records is 3.
The 9-padding
Because the file must end on a block boundary, records consisting of 94 nines are added after the File Control record until the total is a multiple of ten. Those padding records belong to the last block but do not change the count: 12 real records plus 8 padding records is still 2 blocks.
Why the count is wrong
- Records were added or removed by hand after the export, or two files were concatenated.
- The software left out the header and control records, or divided without rounding up.
How to fix it
Re-export the file from the system that created it. The validator states the number of records it counted and the block count that follows from it. A file with no padding gets the separate warning "The file is not padded with 9s to a multiple of 10 records".
Check your own file
Drop your file into the NACHA file validator. It reports problems and does not change the file.