开发者

Fetching DB2 data from IBM i using Java

开发者 https://www.devze.com 2022-12-21 05:09 出处:网络
I need to fetch DB2 data from user libraries on an IBM i machine using Java. I\'m using JTOpen400. Can anyone please he开发者_如何学JAVAlp?You have to rephrase your question. RPGLE files does not exis

I need to fetch DB2 data from user libraries on an IBM i machine using Java. I'm using JTOpen400. Can anyone please he开发者_如何学JAVAlp?


You have to rephrase your question. RPGLE files does not exist on an iSeries. Everything is a DB2 table (which can be used with RPGLE offcourse).

If you have JTOpen400, then I advice to use JDBC. With JDBC the iSeries is a regular DB2 database server. It works like any other database server. Just follow the JDBC guidelines as describes in many books, manuals and websites.


Check SequentialFile for this. Remember to set the record format, and then you can pick out the fields for each line as you iterate them.


You can use JDBC (driver provided by JT400) to access DB2/400 files on the iSeries just like any other database.

The JDBC URL would be something like jdbc:as400://system-name/default-schema;properties

See http://javadoc.midrange.com/jtopen/com/ibm/as400/access/AS400JDBCDriver.html for more information.

0

精彩评论

暂无评论...
验证码 换一张
取 消