This past week I was documenting part of the system from the company I work for in Brazil, and while running through the payment options code I was again confronted by the ancient file format that bank institutions still use today. You’ll never complain about XML files again if you have to deal with a bank file format in your life.
I don’t know how it works here in the US but years ago banks in Brazil came up with a file format dubbed CNAB to exchange financial transactions. It’s basically a layout where data fields are delimited by their byte positions. Seems pretty straight forward, right? So try implementing one and you will feel the pain.
The first problem is bureaucracy. You need a business account, lots of papers, signatures, phones calls and of course talking to Elaine. She is your bank account manager, really polite and willing to help but obviously completely clueless regarding any technical question. Most of the time she is not allowed to put you in contact with someone who works all day writing Cobol and has all the answers to your questions (I actually empathize with the Cobol guy and pity him whenever he needs to answer the phone).
After everything is set and you are allowed to interact with the bank system via their file format they email you the technical instructions. It’s a word document detailing the layout. Prepare yourself to learn how it works through trial and error and a lucky chance to talk to someone on the phone (yes, a real human being) who actually knows what is the default char for the field delimited between bytes 116 and 118. Is it a blank space or just a zero? Can the file be encoded in UTF-8?
You just need a second bank to send you their layout documentation to prove your inner fear. Each bank implements its own CNAB layout version. This is the time you start praying for a framework to deal with all layout inconsistencies across bank institutions.
All is not lost though. After going through all this you have a new skill set. You are ready to work at any bank institution because you did your homework. You have grasped an understanding of all kinds of bank transactions. You have to do this even if you only want to automate monthly invoices for your customers. It’s a hell of a ride my friend.
Now, I’m not trying to undervalue the CNAB file format. It was probably a good solution 20 years ago. It still works. The problem I see is how banks are outdated compared to companies like Paypal and alike. What are they thinking? Can’t you just build a web interface to deal with your internal file formats? Just give me a Restful Web Service in XML or JSON so I can send monthly invoices or pay the employees.