Reputation: 47
I am not even sure where to begin with this one. Our old accounting system used Cobol and flat files as a database. I was wondering if there was any way to import all of this into SQL and making it useful. Ideally I would like to get to a point where I could import this historical data into our ERP. The header in one of the files shows a RMKF entry and I also see some Cobol dll files on the server like Cob32api.dll Any insight appreciated.
Upvotes: 1
Views: 2985
Reputation: 10553
Directly no. Any answer will be determined on which Cobol Dialect you have (I would guess RM Cobol). Some of the Cobol compilers have there own File System
. You may need to unload the files
In general while some Cobol files will be suitable for loading into a Database. Other will require programming:
Loading the Files into a Database is either going to be expensive or time consuming (or both):
There are some commercial that provide access to Cobol Files (I would imagine they are expensive). Googling revealed: http://www.cobolproducts.com/datafile/data-viewer.html popup. But you will still need to analyse the files. Things like redefines can cause issues.
look at this answer Dynamically Reading COBOL Redefines with C# It looks to be similar problem, Thomas used cb2xml to generate the Cobol.
If you get the files into a Text format (see 2 above), cobolToCsv may be useful - Csv files can generally be loaded in to Databases. cobolToCsv will not handle RM-Cobol files directly.
The RecordEditor mentioned by Simon is unlikely to handle RM-Cobol binary files but should handle unloaded Text files. It may prove useful (note I am the author of the RecordEditor)
Upvotes: 3