Skip to content

file_control filler is incorrect after parsing #62

@cyangOL

Description

@cyangOL

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions