AS400 – ORACLE JDBC

5 pts.
Tags:
JDBC
Oracle
Can we take an RPG program that reads a DB2/400 database table and without modifying its code change it to point to the “same” table in an Oracle database using JDBC?

Answer Wiki

Thanks. We'll let you know when a new response is added.

Maybe (but I wouldn’t bet on it).
IF the SQL is all ANSI standard without any IBM extensions.
IF the datatypes all match up properly (Oracle DATE vs DB2 DATE don’t correspond).
IF all names match (this is the easy one).
The optimizers in the two different RDBMSes are most likely going to decide on different access paths, so watch out for that.

=========================================================

I would actually bet against it.

First likely issue would be having the Oracle database defined in the database directory. That would likely need DRDA connectivity which <i>I think</i> is available from Oracle though pricey. You might find an ARD that works elsewhere; you might write your own.

And IF that could be made to work, you’d need to set the Oracle database as the default database on that system. I suspect that every other app would quickly find reason to complain about that.

If Oracle as default DB won’t fly (and I’m pretty sure it won’t), it’s unlikely that there is any SQL in your RPG that allows choosing the database to CONNECT to nor any spec for user/password. If you don’t change the RPG, it’s going to continue connecting to the default *LOCAL database.

Unless your RPG is actually a front-end for JDBC access to your local DB2 database. Then maybe you do something at the Java level. But I’d be surprised.

Tom

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Benderd
    ... its not possible, but you could come rather close to it with Open Source solution ArdGate. Using ArdGate, you could use embedded SQL in RPG to access an Oracle, or any other JDBC capable database and ArdGate could run completely on AS/400. But there are some diffrences between accessing the local database and a remote database from RPG. You would have to connect, use commitment controll and there are some limitations for remote access compared to local access and ArdGate will add some additional restrictions too. But it would be possible to access an Oracle database in a very similar way as accessing the local DB2. Dieter Bender … there is an Open Source alternative solution available. Using ArdGate, you could access all JDBC databases direct from COBOL or RPG applications, using embedded SQL. Installation and configuration is done in less than a half day. Dieter Bender Access any Database from ADABAS to XBASE with embedded SQL in RPG. http://sourceforge.net/projects/appserver4rpg/
    40 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following