How can I export data in a legacy DOS application when no export option is available?

梦想与她 提交于 2019-12-11 21:16:13

问题


We've been given the task by my customer to export data from a legacy DOS system, using a RAIMA database, so it can be imported into a new system we are writing for them. It looks like the data is stored in a flat file format, though when we open the files most of the text is gibberish.

We do see Raima Database Manager along the top of the files we opened ... We tried Googling that term and seems it is an old database format. Needless to say the vendor who wrote the software no longer supports it. Is there any other way we can get this data to export?

Is there a way to automatically scrape the data from the screen?

Note

It's a simple invoicing system, all the information is on a single screen in the application.


回答1:


for Raima Data Manager Version 3.21A This article indicates that the app was likely written in C and it used Raima Data Definition Language to structure the files - look in the files for something similar check the .dbd and .tbl - you may have to view them with something like VI that has a hex mode. It is very likely the data structures are embeded in one of the files.

Edit:

here's some links that might lead you to more information

http://www.raima.com/

http://www.raima.com/database_technology/rdm.php3 http://www.raima.com/database/download.php3

http://database.ittoolbox.com/topics/t.asp?t=411&p=415&h1=411&h2=412&h3=415

http://www.faqs.org/faqs/databases/free-databases/

http://www.ittia.com/products/ittia_odbc.html

http://www.mactech.com/articles/mactech/Vol.07/07.02/db_VistaIII/index.html




回答2:


Raima still seem to be going, it might be worth dropping them a mail or seeing if one of their new products is backwards compatible. Failing that it's a case of reverse engineering the app to either dump the data from it, or figure out the file format.




回答3:


it would help to know what version of Raima Database Manager was used; db_Vista or RDM or Velocis or RDM Embedded? The approximate era when the DOS app was written would help narrow down the possible version.

RDM Embedded was released as open source by Centura around 2000 and then renamed to db.linux. You might find some information in the source code that sheds light on how they structured the files.

In any case db_Vista was born in 1982 so it is likely a B-Tree file/indexing system.




回答4:


As a second option (or maybe last resort), if Raima can't help you, you can use an automation tool to scrape the information off the screen and analyse it. Given it's a DOS app, if it is can be run in a Windows console window I would use a tool like Eggplant, TestComplete, or HighTest. These tools are all designed primarily for test automation through the GUI or UI but are pretty good for this type of job. I think Hightest used to have a DOS version back in the day.




回答5:


The other option might be use whatever reporting mechanism the dos app has to print out all the application data to a text file (via redirection of prn: ) and then parse it from the plain text format - it would be a lot of work (although regex can rapidly parse out the superfluous crap) but I've done it.




回答6:


Will the DOS application run in a command window in Windows XP? If so, you might be able to cut and paste the data into a text editor or spreadsheet.

Another idea occurs to me. You can use Java Robot or even simple Win API code to send keystrokes to the command window to page through the records. That's half your battle. It looks like the command window has an option to "Select All", combine that with the "Copy" command and you should be set.




回答7:


You should also probably spend twenty minutes dismissing the possibility that the database format isn't something common for that era - db3, Paradox, Filemaker or the like - but with file extensions renamed. Try opening in Excel or similar specifying the format (add the extra filters to Excel first if you need them). Borland's Database Desktop also used to be good for this kind of examination.

It's a long shot, but it's paid off for me on several occasions when some 'obscure' file format turned out to be a obfusticated version of something much more common (db3 in particular). Outside the DOS era I've found obfusticated Access files cropping up from time to time too.




回答8:


Raima (at least the versions I use) comes with a tool called datdump which writes the data files out in human-readable format. There is also a tool called dbexp which can generate CSV files from a Raima database.

I bet the fine folks at Raima could help you. I know they are still around. I see their web site even posts the file format of their data files in its Support area. This might change from version to version of Raima, but should give you a good idea on how to start writing your own extraction code.



来源:https://stackoverflow.com/questions/420762/how-can-i-export-data-in-a-legacy-dos-application-when-no-export-option-is-avail

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!