Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Read COBOL database (DAT, IDX) with JDBC

Reply
Thread Tools

Read COBOL database (DAT, IDX) with JDBC

 
 
Ferro
Guest
Posts: n/a
 
      10-27-2003
Do someone know if there is some object to read
a COBOL database with JDBC?

Thanks a lot.
Ferro.


 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      10-27-2003
On Mon, 27 Oct 2003 18:22:03 +0100, "Ferro" <(E-Mail Removed)> 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.
 
Reply With Quote
 
 
 
 
Gert van der Kooij
Guest
Posts: n/a
 
      10-27-2003
In article <(E-Mail Removed)>,
http://www.velocityreviews.com/forums/(E-Mail Removed) says...
> On Mon, 27 Oct 2003 18:22:03 +0100, "Ferro" <(E-Mail Removed)> 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
 
Reply With Quote
 
Ferro
Guest
Posts: n/a
 
      10-28-2003
> 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.


 
Reply With Quote
 
Dave Monroe
Guest
Posts: n/a
 
      10-28-2003
Gert van der Kooij <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)4all.nl>.. .
> In article <(E-Mail Removed)>,
> (E-Mail Removed) says...
> > On Mon, 27 Oct 2003 18:22:03 +0100, "Ferro" <(E-Mail Removed)> 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
 
Reply With Quote
 
Gert van der Kooij
Guest
Posts: n/a
 
      10-28-2003
In article <bnlc3d$11pavr$(E-Mail Removed)-berlin.de>, (E-Mail Removed)
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
 
Reply With Quote
 
Thomas Kellerer
Guest
Posts: n/a
 
      10-29-2003
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

 
Reply With Quote
 
Dave Monroe
Guest
Posts: n/a
 
      10-29-2003
Thomas Kellerer <(E-Mail Removed)> wrote in message news:<bnnp3u$13ll06$(E-Mail Removed)-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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataBase DataBase DataBase DataBase scott93727@gmail.com Computer Information 0 09-26-2012 09:40 AM
Code to read Cobol data files none Python 2 09-22-2005 07:38 AM
read COBOL index file with perl Gabkin Perl Misc 4 07-05-2004 02:35 PM
How to read files written with COBOL Batista, Facundo Python 7 05-14-2004 03:16 AM
RE: How to read files written with COBOL Batista, Facundo Python 1 05-10-2004 10:02 PM



Advertisments