Re:Don't hate COBOL until you've tried it
by waltman on Friday October 27, 2017 @03:17PM
(#15571367)
It's certainly true that there's a lot of boilerplate verbosity involved in reading files in COBOL. But once you've done that, parsing out the fields will likely be much simpler than in most modern languages. Records like this are still produced at government agencies such as the US Census Bureau. I've often wondered if it might be simpler to do the parsing in COBOL and then pipe it to another language to do the rest of the processing.
[ Parent
| on HN ]
On IBM i all files are are also databases, so you could just define the length of all the fields in the file, then it's a SQL database ready for use. No need for a program to parse it. Just define a file, copy the incoming file to that file. Ready to be handled with SQL. Fixed length records are trivial on the platform.