Given the example ach file ach.txt:
101 000000000 0000000002112151052A094101BANK NAME BANK NAME
5220COMPANY NAME 1123456789PPDDESCRIPTIO211215211216 1000000000000001
62200000000000000000000 0000000100EMPLOYEE NAME EMPLOYEE NAME 0000000000000001
822000000100000000000000000000000000000001001123456789 000000000000001
9000001000001000000010000000000000000000000000000000100
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
Read it then write it to ach2.txt:
ach = ACH::ACHFile.new(File.read("ach.txt"))
File.write("ach2.txt", ach.to_s)
Content of ach2.txt becomes:
101 000000000 0000000002112151052A094101BANK NAME BANK NAME
5220COMPANY NAME 1123456789PPDDESCRIPTIO211215211216 1000000000000001
62200000000000000000000 0000000100EMPLOYEE NAME 0000EMPLOYEE NAME 0000000000000001
822000000100000000000000000000000000000001001123456789 000000000000001
9000001000001000000010000000000000000000000000000000100999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
I expect the ach2.txt to be the same as ach.txt.
Given the example ach file
ach.txt:Read it then write it to
ach2.txt:Content of
ach2.txtbecomes:I expect the ach2.txt to be the same as ach.txt.