Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

file_control filler is incorrect after parsing #62

Open
cyangOL opened this issue Dec 15, 2021 · 0 comments
Open

file_control filler is incorrect after parsing #62

cyangOL opened this issue Dec 15, 2021 · 0 comments
Assignees

Comments

@cyangOL
Copy link

cyangOL commented Dec 15, 2021

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.

@henriquegasques henriquegasques self-assigned this Mar 29, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants