Legacy ISAM Access Methods for Java?
GamerGeek asks: "I work for a small company in the Midwest. We have some old products written in Databus / PL/B. In my spare time I have been investigating the idea of rewriting these programs in Java. My main problem is that the programs store data in ISAM (Indexed Sequential Access Method) files. Rewriting everything all at once is not feasible so the data needs to stay in the ISAM files. I am looking for a 100% java solution for reading and updating ISAM files. A Google search does not turn up anything. Is there one out there? Does anyone know the file format / process for reading an ISAM file? I would be willing to write a package myself if I had that information and open source it too."
I don't have any manuals, but I when I was working in an old IBM shop and a file would get corrupted, I frequently would just dump the last few records of the index and of the file and manually reconnect them. It was usually a fairly quick process to figure out which index had been corrupted.
I can't imagine it would be particularly difficult to write a few Java routines to access them. Its a pretty straight forward format.
ISAM is Indexed Sequential Access Method. It's not a format. Lots of people sell ISAM libraries, but the formats are all different and non-compatible. Your best bet is to dump your data from your old ISAM files. Then reengineer the database. Write your Java apps to use the new database.
Not trivial, but not rocket science either.
If tits were wings it'd be flying around.
It really does depend on the files themselves.
ISAM is a method of storing data, but it isn't a standard file format any more than "relational database"; it's just a name for a type of file, and there are many different ISAM files.
I'm not familiar with Databus / PL/B, so I can't speak with absolute authority, but I do have experience with a near-identical situation involving a different type of ISAM file, so with luck I might be able to at least offer some clues.
A couple of years ago, I was asked to look into the possibility of accessing our existing ISAM files in a web page.
These files were the database for a fairly old application that we sold on various flavours of Unix, and some of our clients wanted to give their customers a web front-end for ordering.
I offered three approaches:
1) Write a web interface using the same language and tools as the existing application. This would mean that the data would be easily available, as would our existing business logic.
2) Write a VB-Script web site, and use the ODBC driver that we knew was available for the ISAM files.
3) Write a Java-based web site, and try to find a JDBC driver to do the same job.
Option 1 was ruled out quite quickly for various reasons.
We eventually went with the VB route, primarily because the technology was already in place. There was a beta-test JDBC driver available, but we couldn't get it to work.
However, the important point was that we did find a company that specialises in supplying drivers for all sorts of obscure file formats.
I recommend you have a look at Trifox inc. Their Vortex and Genesis database drivers support just about every database I've ever heard of, and plenty I haven't, are available for practically every platform, and for a wide variety of languages and interfaces.
I have to confess that they weren't particularly helpful when I contacted them; it was their JDBC driver that didn't work (their ODBC driver did work, but we already had one of those), but don't let that put you off - they do seem to have a lot of expertise in the area.
(Spudley Strikes Again!)
Go here, and use the time you saved to work on your google searching skills.
pb Reply or e-mail; don't vaguely moderate.
PD's suggestion is a good one if you can re-engineer your existing database. If that's not an option (too much legacy code) then you do indeed need some kind of compatibility layer. But you should be searching for PL/B compatibility layers, 'cause that's the system that defines the file format. Here's one I found by Googling "PL/B ISAM". There are probably others.
Or you could write your own JDBC driver for PL/B ISAM. That's assuming you have the time, the expertise, and feel up to investigating the PL/B standard. Oh, and also assuming the standard explicitly defines ISAM file format, and doesn't leave it up to the vendor. You'll have to buy a copy of the standard (that's how standard comitttees support themselves) to find out.
I do thank GamerGeek for asking this question. PL/B seems to have been around for about 30 years without my ever running across it. More trivia to clog up my brain...