Read COBOL database (DAT, IDX) with JDBC

F

Ferro

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

Thanks a lot.
Ferro.
 
G

Gert van der Kooij

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 :)
 
D

Dave Monroe

Gert van der Kooij said:
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
 
T

Thomas Kellerer

Dave said:
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
 
D

Dave Monroe

Thomas Kellerer said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,835
Latest member
KetoRushACVBuy

Latest Threads

Top