Read COBOL database (DAT, IDX) with JDBC

Discussion in 'Java' started by Ferro, Oct 27, 2003.

  1. Ferro

    Ferro Guest

    Do someone know if there is some object to read
    a COBOL database with JDBC?

    Thanks a lot.
    Ferro.
    Ferro, Oct 27, 2003
    #1
    1. Advertising

  2. Ferro

    Roedy Green Guest

    On Mon, 27 Oct 2003 18:22:03 +0100, "Ferro" <> wrote or
    quoted :

    >Do someone know if there is some object to read
    >a COBOL database with JDBC?


    What the database is written in, or what program put it the data there
    is irrelevant. You do it the same way with JDBC.

    See http://mindprod.com/jgloss/jdbc.html

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
    Roedy Green, Oct 27, 2003
    #2
    1. Advertising

  3. In article <>,
    says...
    > On Mon, 27 Oct 2003 18:22:03 +0100, "Ferro" <> wrote or
    > quoted :
    >
    > >Do someone know if there is some object to read
    > >a COBOL database with JDBC?

    >
    > What the database is written in, or what program put it the data there
    > is irrelevant. You do it the same way with JDBC.
    >


    Ferro probably means some kind of key-sequenced file (ISAM/VSAM)
    which can be opened and read by regular COBOL definitions/statements.
    Check http://www.legacyj.com/percobol/perc_tech.html for some types
    of COBOL proprietary data types/files.

    AFAIK they can't be read by regular JDBC drivers.

    Please coorect me if I'm wrong :)
    Gert van der Kooij, Oct 27, 2003
    #3
  4. Ferro

    Ferro Guest

    > Ferro probably means some kind of key-sequenced file (ISAM/VSAM)
    > which can be opened and read by regular COBOL definitions/statements.
    > Check http://www.legacyj.com/percobol/perc_tech.html for some types
    > of COBOL proprietary data types/files.


    I need to read C-ISAM Microfocus file.
    Maybe the iWay has something about this.

    Thanks a lot.
    Ferro.
    Ferro, Oct 28, 2003
    #4
  5. Ferro

    Dave Monroe Guest

    Gert van der Kooij <> wrote in message news:<4all.nl>...
    > In article <>,
    > says...
    > > On Mon, 27 Oct 2003 18:22:03 +0100, "Ferro" <> wrote or
    > > quoted :
    > >
    > > >Do someone know if there is some object to read
    > > >a COBOL database with JDBC?

    > >
    > > What the database is written in, or what program put it the data there
    > > is irrelevant. You do it the same way with JDBC.
    > >

    >
    > Ferro probably means some kind of key-sequenced file (ISAM/VSAM)
    > which can be opened and read by regular COBOL definitions/statements.
    > Check http://www.legacyj.com/percobol/perc_tech.html for some types
    > of COBOL proprietary data types/files.
    >
    > AFAIK they can't be read by regular JDBC drivers.


    Accessing legacy systems isn't as simple as using JDBC unless the
    application is sitting over a standard database (Oracle, DB2, SQL
    Server, etc). If the data is stored in a COBOL ISAM file, the only
    way to get to it is through a COBOL program.

    One popular approach is using a program that 'pretends' to be a user
    sitting at a terminal and sends and receives data to/from the COBOL
    host.

    If the terminal session presents the inputs and outputs you are
    looking for, you don't have to mess with writing a new COBOL program.

    You might want to check out an old program called 'expect' that uses
    send/expect sequences. It's kind of quaint by today's standards but
    might be a starting point.
    >
    > Please coorect me if I'm wrong :)


    Nope. You are correct. There are several companies that have made a
    business out of integrating legacy systems with Java. Check out
    AttachMate and Cleo.

    FYI

    Dave Monroe
    Dave Monroe, Oct 28, 2003
    #5
  6. In article <bnlc3d$11pavr$-berlin.de>,
    says...
    > > Ferro probably means some kind of key-sequenced file (ISAM/VSAM)
    > > which can be opened and read by regular COBOL definitions/statements.
    > > Check http://www.legacyj.com/percobol/perc_tech.html for some types
    > > of COBOL proprietary data types/files.

    >
    > I need to read C-ISAM Microfocus file.
    > Maybe the iWay has something about this.
    >


    Maybe you can use the JDBC driver from Recital?

    http://www.recital.com/products_jdbc.htm
    Gert van der Kooij, Oct 28, 2003
    #6
  7. Dave Monroe schrieb:

    > Accessing legacy systems isn't as simple as using JDBC unless the application
    > is sitting over a standard database (Oracle, DB2, SQL Server, etc). If the
    > data is stored in a COBOL ISAM file, the only way to get to it is through a
    > COBOL program.


    Why should COBOL be the *only* way? After all it's a file on disk, and can be
    opened in binary mode.
    If that file format is documented, or can be re-engineered then it should be
    possible to read it with Java.

    Not with JDBC though (although it should be possible to write a JDBC driver for
    that kind of file, after all that shouldn't be too different compared to reading
    a dBase file)

    Thomas
    Thomas Kellerer, Oct 29, 2003
    #7
  8. Ferro

    Dave Monroe Guest

    Thomas Kellerer <> wrote in message news:<bnnp3u$13ll06$-berlin.de>...
    > Dave Monroe schrieb:
    >
    > > Accessing legacy systems isn't as simple as using JDBC unless the application
    > > is sitting over a standard database (Oracle, DB2, SQL Server, etc). If the
    > > data is stored in a COBOL ISAM file, the only way to get to it is through a
    > > COBOL program.

    >
    > Why should COBOL be the *only* way? After all it's a file on disk, and can be
    > opened in binary mode.


    Well, maybe it's a file, maybe it's a bunch of files that
    inter-relate. Suppose there fields stored in packed decimal format.
    Is there another language that natively supports that?

    Then there's the matter of the file layout. Fixed vs. variable length
    records, redefined record definitions, secondary keys, etc. It gets
    ugly.

    > If that file format is documented, or can be re-engineered then it should be
    > possible to read it with Java.


    Therein lies yet another rub. There are a gazillion ways to implement
    an ISAM file system and most proprietary implementations (e.g. DEC
    Files 11) are _not_ publicly available specs.

    While you might be able to torture data out of the ISAM database
    without using the manufacturer's API, short of some kind of national
    security issue, you probably don't want to mess with it.
    Dave Monroe, Oct 29, 2003
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Batista, Facundo

    How to read files written with COBOL

    Batista, Facundo, May 10, 2004, in forum: Python
    Replies:
    7
    Views:
    1,155
    Buck Nuggets
    May 14, 2004
  2. Batista, Facundo

    RE: How to read files written with COBOL

    Batista, Facundo, May 10, 2004, in forum: Python
    Replies:
    1
    Views:
    503
    Steve Holden
    May 10, 2004
  3. none
    Replies:
    2
    Views:
    562
    Dennis Lee Bieber
    Sep 22, 2005
  4. goosen_cug
    Replies:
    2
    Views:
    347
    Howard
    Jul 3, 2006
  5. Gabkin

    read COBOL index file with perl

    Gabkin, Jul 5, 2004, in forum: Perl Misc
    Replies:
    4
    Views:
    503
    Gabkin
    Jul 5, 2004
Loading...

Share This Page