General

What is bacchus?
Bacchus is a formatter and parser for ACH files. It can be used as standalone library, or integrated with Spring Batch.
Which ACH record formats are supported?
See the supported formats table.
What is "normalizing" a file?
ACH files include a lot of redundant information, such as checksums, record counts, and the like. Bacchus has the ability to replace values found in the file with values that it computed. This simplifies generating new files and making small changes to existing files.

Command Line

How do I use Bacchus from the command line?
Use the command line job runner found in Spring Batch. Bacchus includes a pre-configured context for common command-line usages. The pre-configured context is command.xml.
How can I override the default parameter values on the command line?
Parameters can be overridden using System properties or environment variables.
What are the command line parameters?
reader.resource
The input ACH file. The default is file:input.txt.
reader.encoding
The encoding of the input ACH file. The default is US-ASCII.
reader.lenientSeparator
Whether line separators should be treated leniently. Strictly valid ACH files contain 94-byte records with no separators. Lenient treatment allows the input file to contain line separators between records. The default is {@code true}.
writer.resource
The output ACH file. The default is file:output.txt.
writer.encoding
The encoding of the output ACH file. The default is US-ASCII. For strictly compliant encoding, you can use one of the character sets supplied with Bacchus. These character sets guarantee that no invalid character will be emitted, and include some transposition to replace invalid characters with reasonable alternates.
writer.lineSeparator
The line separator to use between records in the ACH output file. The default is a single newline (\n). For strictly compliant encoding, eliminate this value by setting this value to an empty string.

How do I validate a file?
Use the validate command line job in the built in context:

org.springframework.batch.core.launch.support.CommandLineJobRunner command.xml validate

Use the command line parameters to supply file names and other settings as needed.
How do I normalize a file?
Use the normalize command line job in the built in context:

org.springframework.batch.core.launch.support.CommandLineJobRunner command.xml normalize

Use the command line parameters to supply file names and other settings as needed.

Character Sets

How are the ACH character set encodings handled?
ACH records may contain only 7-bit characters in the range 32 to 127. Three character sets are supplied to ensure that records comply with the encoding requirements.
What are the characteristics of the X-ACH character set?
The X-ACH character set simply replaces invalid characters with a question mark '?'. The Unicode substitute character \u00a1 is not used because it is not legal in ACH.
What are the characteristics of the X-ACH-X character set?
The X-ACH-X character set attempts to transpose invalid characters to 1-byte equivalents. The transpositions replace characters found within the java.lang.Character.UnicodeBlock#LATIN_1_SUPPLEMENT and java.lang.Character.UnicodeBlock#LATIN_EXTENDED_A ranges with reasonable equivalents within the allowed range. In most cases, the replacement is simply the unaccented version of the same character.
What are the characteristics of the X-ACH-XL character set?
The X-ACH-XL character set extends the X-ACH-X character set with transliterations that cover ligatures found in the java.lang.Character.UnicodeBlock#LATIN_1_SUPPLEMENT and java.lang.Character.UnicodeBlock#LATIN_EXTENDED_A ranges. This character set is intended for internal translations. The transliterations may result in more than one byte of output for a single input character. In addition, the byte order marks FFFE and FFFF are suppressed and result in no output. Because of these length-changing properties, this character set should not be used directly on the output stream, where it could cause unexpected extra or missing bytes in fixed width fields.