views:

983

answers:

8

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  A: 

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.

Steven Robbins
Thanks Steve ... good idea!
mattruma
+1  A: 

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.

DMKing
The problem is that there are 1000s of records ... could this be automated?
mattruma
Sounds like smacl might have the answer for you.
DMKing
I think this might work ... would just need to send key strokes to the dos window.
mattruma
+1  A: 

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.

Shane MacLaughlin
So do they allow you to capture the text and output it in some format?
mattruma
They allow capturing of text from Windows and/or Windows controls to a scripting language, that you can subsequently output to file. I personally use TestComplete, which is well worth a go. It also has a 30 day trial which may be enough to get your project done ;)
Shane MacLaughlin
+2  A: 

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.

kloucks
Interesting, I was looking for a way to read RDM Embedded files a few years ago! I'll have to take a look at this again.
DMKing
The top of the file says Raima Data Manager Version 3.21A ... the file types have extensions like d0, d1, tbl, nbs, dbd.
mattruma
+1  A: 

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.

kloucks
+1  A: 

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.

Cruachan
What do you mean by extra filters?
mattruma
When you install Office the import filters you have available are part of the install options (xls, dbf, text etc) - the default is a common set but I don't think includes the more obscure options - you can add them in the usual way.
Cruachan
+2  A: 

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

kloucks
What is VI? Pardon my ignorance! :)
mattruma
VI is an editor that came to life long ago in a UNIX world in a galaxy far far away - search for Vi or VIM for windows
kloucks
Loads of free hex editors about - I use XV132
Cruachan
+1  A: 

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.

Dave Eisen