Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Java Programming

Legacy ISAM Access Methods for Java? 19

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."
This discussion has been archived. No new comments can be posted.

Legacy ISAM Access Methods for Java?

Comments Filter:
  • Dump and read (Score:3, Informative)

    by DaoudaW ( 533025 ) on Monday April 07, 2003 @06:24PM (#5681874)
    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 not a format (Score:5, Informative)

    by PD ( 9577 ) <slashdotlinux@pdrap.org> on Monday April 07, 2003 @06:24PM (#5681878) Homepage Journal
    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.
    • PL/B and ISAM (Score:4, Informative)

      by fm6 ( 162816 ) on Monday April 07, 2003 @08:42PM (#5682695) Homepage Journal
      Right you are. More precisely, ISAM is a technique for managing data. Pretty good definition here [techtarget.com].

      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 [sunbelt-plb.com] 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 [sysmaker.com]. 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...

  • it depends... (Score:5, Informative)

    by Spudley ( 171066 ) on Monday April 07, 2003 @06:42PM (#5681990) Homepage Journal
    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 [trifox.com]. 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.
    • There's also a fourth approach that's worth recording.

      4. Expose business rules and ISAM files via a business rule server of your own, and write the web site in whatever language you want that can talk to sockets.

      At work, we do things this way. It was a win in our situation, because our business logic was pretty extensive, and rewriting all of it in another language so that raw database access would be safe would be an immense amount of work. OTOH, it has drawbacks, too, because you have to handle the n
  • MySQL + JDBC + ??? (Score:3, Insightful)

    by blackcoot ( 124938 ) on Monday April 07, 2003 @06:42PM (#5681993)
    I believe that MySQL does ISAM and I know it has JDBC stuff, so I'm thinking that if worst comes to worst, you can convert MySQL's ISAM stuff into Java. However, my gut instinct says that maybe it would be better do to something like use Sleepy Cat's [sleepycat.com] Berkeley DB Java API and write something to convert the ISAM files into Berkeley format.
  • here's one... (Score:2, Informative)

    by pb ( 1020 )
    Go here [dbcsoftware.com], and use the time you saved to work on your google searching skills.
  • by ralphclark ( 11346 ) on Monday April 07, 2003 @07:30PM (#5682252) Journal
    the other posters are correct to say that implementations of ISAM differ. In particular the indexing scheme may be more or less sophisticated (eg. simple one-level hash index as in a cheap PC database package vs. multi-level indexing with keys grouped in buckets like in expensive multi-user VMS RMS). However even in the more complex forms it isn't that difficult to understand, just take one of the smaller files and get a hex editor on it...
  • ISAM (Score:3, Insightful)

    by MeanMF ( 631837 ) on Monday April 07, 2003 @10:39PM (#5683395) Homepage
    If you're rewriting the applications, why couldn't you move the data into a relational database at the same time?
  • From a quick google, it would seem that either

    http://www.dbcsoftware.com/

    or

    http://www.sunbelt-plb.com/

    could provide a solution, though that might depend on the toolset you are using.
  • I once worked at a place that had created an ODBC driver for the ISAM's. This would greatly ease your java development, as you could simply use JDBC to connect to the ISAMs. From what I know, the solution was a little clunky, but it's doing them fine while they take their time to switch over to oracle, and other more up-to-date storage techniques. Oh yeah, that place, was the Marine Environmental Data Service, which is part of the Department of Fisheries and Oceans, up here in Canada Eh.....
  • You might be able to write a generator for Torque [apache.org] that can generate classes enabling you to communicate with your mystery format. Torque was recently refactored out of the Jakarta Turbine project so that it could be used independently as an object-persistence layer for any Java application. You define your database schema in an xml meta-file and Torque uses a generator to create the Java classes that you use to access the data store. In this way you don't have to muck around with JDBC. There are existin

  • You might want to try Subject, Wills, and Company's DBC FS - A File Server environment that allows access to DBC and PB/L files in several different methods. I've been writing databus code for over 20 years - I've used this product to access data from old aapplication in C++, in Access and in VB - haven't tried Java with it yet. Let me know if I can answer any questions for you

Anyone can make an omelet with eggs. The trick is to make one with none.

Working...