ABA/Cemtext Validator

About

This project is an SDK for reading, writing and validating ABA/Cemtext files. The ABA format, which I first introduced in this article, is a de facto standard used by Australian banks and other financial institutions, which allows users to perform bulk payments. I received a lot of interest in my original article, so I decided to create an object model for working with these files in .NET, as well as providing a mechanism to validate them.

The SDK includes:

  • AbaFile – Container for ABA records. Reads, writes and validates ABA files.
    • Record – Abstract base class for records in ABA files.
      • DescriptiveRecord – Type “0” records.
      • DetailRecord – Type “1” records.
      • FileTotalRecord – Type “7” records.
  • Validator – Holds the results after validating an ABA file.
    • ValidationError – Describes each error in an ABA file.

It also comes with a sample application for validating ABA files. This application displays the contents of the ABA file and lists the validation errors, if any. Double-clicking an error highlights the affected line.

The AbaValidator.dll assembly is written in C#, but can be referenced in other .NET projects. It is not tied to any particular presentation framework, so you are free to use it for WinForms, WPF, ASP.NET and other project types.

Requirements

  • .NET Framework 4.0
  • Visual Studio 2012
  • Sandcastle (optional, used to generate help file)

Note: The source code can be easily adapted to earlier versions of the framework and versions of Visual Studio.

Downloads

If you find my code useful, please consider making a donation.

Current version: 1.0.1

  • Fixed an issue where an exception would be thrown while validating an ABA file if the number of detail records did not match the count.

SDK, help and example app (206KB)

Source code – Visual Studio 2012 project (659KB)

9 thoughts on “ABA/Cemtext Validator

  1. vote

    Slight bug in your validation of the File Total record BSB. It always reports the format for the BSB is incorrect as it’s comparing to the literal “999-999” – so only a BSB of 999-999 passes validation.

    Line 117-121 of FileTotalRecord.cs

    // bsb format filter
    value = str.Substring(Offsets.BsbFormatFilter);
    if (!value.Equals(“999-999”)) {
    validator.AddError(ErrorTypes.RecordInvalid | ErrorTypes.WrongFormat, “BSB format filter must be ‘999-999’.”, this);
    }

    Reply

Leave a reply

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

required