当没有可用的导出选项时,如何导出旧版 DOS 应用程序中的数据?
我的客户给我们一项任务,使用 RAIMA 数据库从旧 DOS 系统中导出数据,以便将其导入到我们为他们编写的新系统中。 看起来数据是以平面文件格式存储的,尽管当我们打开文件时,大部分文本都是乱码。
我们确实在打开的文件顶部看到了Raima Database Manager...我们尝试用谷歌搜索该术语,似乎它是一种旧的数据库格式。 不用说,编写该软件的供应商不再支持它。 有没有其他方法可以导出这些数据?
有没有办法自动从屏幕上抓取数据?
注意
这是一个简单的发票系统,所有信息都在应用程序的单个屏幕上。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
对于 Raima Data Manager 版本 3.21A 本文 表明该应用程序可能是编写的在 C 中,它使用 Raima 数据定义语言 来构建文件 - 在文件中查找类似的内容,检查 .dbd 和 .tbl - 您可能需要使用具有十六进制的 VI 等内容来查看它们模式。 数据结构很可能嵌入在其中一个文件中。
编辑:
这里有一些链接可能会引导您获取更多信息
http://www.raima。 com/
http://www.raima.com/database_technology/rdm.php3< /a>
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
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
Raima 似乎仍在继续,可能值得给他们发一封邮件或看看他们的其中一个是否新产品向后兼容。 如果失败,则需要对应用程序进行逆向工程以转储其中的数据或找出文件格式。
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.
了解使用的 Raima 数据库管理器版本会有所帮助; db_Vista 或RDM 或Velocis 或RDM 嵌入式? 编写 DOS 应用程序的大致时代将有助于缩小可能的版本范围。
RDM Embedded 在 2000 年左右由 Centura 开源发布,然后更名为 db.linux。 您可能会在源代码中找到一些信息,这些信息揭示了它们如何构造文件。
无论如何,db_Vista 诞生于 1982 年,因此它很可能是一个 B 树文件/索引系统。
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.
作为第二个选择(或者可能是最后的手段),如果 Raima 无法帮助您,您可以使用自动化工具从屏幕上抓取信息并进行分析。 鉴于它是一个 DOS 应用程序,如果它可以在 Windows 控制台窗口中运行,我会使用像 Eggplant、TestComplete 或 HighTest. 这些工具主要是为通过 GUI 或 UI 进行测试自动化而设计的,但非常适合此类工作。 我认为 Hightest 曾经有一个 DOS 版本。
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.
另一种选择可能是使用 dos 应用程序必须的任何报告机制将所有应用程序数据打印到文本文件(通过 prn: 重定向),然后从纯文本格式解析它 - 这将是大量工作(尽管正则表达式可以快速解析出多余的废话)但我已经做到了。
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.
DOS 应用程序是否会在 Windows XP 的命令窗口中运行? 如果是这样,您也许可以将数据剪切并粘贴到文本编辑器或电子表格中。
我想到了另一个想法。 您可以使用 Java Robot 甚至简单的 Win API 代码将击键发送到命令窗口以翻阅记录。 这就是你战斗的一半。 看起来命令窗口有一个“全选”选项,将其与“复制”命令结合起来,您应该已经设置好了。
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.
您可能还应该花 20 分钟来排除数据库格式在那个时代并不常见的可能性 - db3、Paradox、Filemaker 等 - 但文件扩展名已重命名。 尝试在 Excel 或类似的指定格式中打开(如果需要,请先将额外的过滤器添加到 Excel)。 Borland 的 Database Desktop 也曾经适合此类检查。
这是一个不太可能的尝试,但在某些情况下,当某些“模糊”文件格式被证明是更常见的文件格式(尤其是 db3)的模糊版本时,它为我带来了回报。 在 DOS 时代之外,我也发现有时会出现一些混乱的 Access 文件。
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.
Raima(至少是我使用的版本)附带了一个名为 datdump 的工具,它以人类可读的格式写出数据文件。 还有一个名为 dbexp 的工具,可以从 Raima 数据库生成 CSV 文件。
我打赌 Raima 的优秀人员可以帮助你。 我知道他们还在。 我看到他们的网站甚至在其支持区域中发布了他们的数据文件的文件格式。 这可能会因 Raima 的版本而异,但应该能让您了解如何开始编写自己的提取代码。
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.