wood burning stoves 2.0*
The moose likes JDBC and the fly likes Java and DB2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Java and DB2" Watch "Java and DB2" New topic
Author

Java and DB2

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Does anyone have any info on Java and DB2 on OS390, I'm confused
by reading IBMs site of all I need. I've used JDBC my PC but conecting to DB2 here at work seems not as easy. If someone has a simple java DB2 select program that I can use to make sure I have the connections set up, I'll be your friend for life.
Thanks
Ray Marsh
Ranch Hand

Joined: Jan 12, 2000
Posts: 458
This discussion thread may help or at least give you some contacts that may have some information. It's not specifically about os390, but the AS/400 does use db2. You could email them and ask them to stop by this forum and deposit their 0.02.
http://www.javaranch.com/ubb/Forum3/HTML/000036.html


Anxiety does not empty tomorrow of its sorrows, but only empties today of its strength. – Charles Spurgeon
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Thanks Ray
I converted their code to db2 drivers and it almost compiles but I get a "Type expected" error on the System.out.println !! I don't think I've seen this error on this statement, any suggestions ?
and from others it seems I need to install db2 connect on my server which I'm doing now.
Ray Marsh
Ranch Hand

Joined: Jan 12, 2000
Posts: 458
Sorry Tom, I haven't had much experience with it, myself.
Perhaps Ajay Kumar could help. He's had some experience with this and supplied the code sample.
Shoot him an email and invite him to join this thread. I hda trouble compiling the code myself and have not gotten back to it recently.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I was able to get the one under "PROBLEMS IN CONNECTING TO ORACLE" to compile by changing the code for db2 drivers. After they finish adding db2 connect we'll see what happens.
Ray Marsh
Ranch Hand

Joined: Jan 12, 2000
Posts: 458
Let me know. I'm interested in the outcome.
Jeffrey Chen
Greenhorn

Joined: Dec 13, 2001
Posts: 4
Hi Tom, I have a same problem to connect to a DB2 on os/390. I wonder if you got your problem solved. If you did, would you please shed me some lights on how did you solve it? Here are some of my problems:
I am trying to run a test application on my NT box to access a DB2 database on os/390. The administrator told me that I can only access the DB2 database through DB2 Connect which is running on another machine.
If I use COM.ibm.db2.jdbc.net.DB2Driver from IBM, using the connection string "jdbc.db2://db2servername:50000//db2databasename", I got error message "Error receiving socket, server is not responding". Then I was trying to access the DB2 UDB on my NT box, it seems i have to start the JDBC Applet server on port 6789 to this application to work. I don't know if there is a JDBC applet server for DB2 on os/390 or DB2 Connect for os/390.
Do you have any idea about this?
Thanks
Jeffrey Chen
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java and DB2
 
Similar Threads
Is there is any way to connect to Database without JDBC
JDBC Connection to DB2 on OS/390
JDBC applets
DB2 Stored procedures written in Java
StartsWith function in DB2