× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



AS400JDBCDriver Issues

 

We are having the following two issues with the
com.ibm.as400.access.AS400JDBCDriver class in the JT400.JAR AS400
Toolbox.

 

Problem 1

Under OS400 V5R1 the following works (server models: 820 and 270):

Load of Driver:

com.ibm.as400.access.AS400JDBCDriver

Load of url:

jdbc:as400:edsdev;naming=sql;errors=full;date format=iso;extended
dynamic=true;package=secPkg;package cache=true;cursor
hold=true;blocksize=512;driver=native

The drive loads and registers correctly and runs using toolbox mode on
the PC, and using native mode on the AS400.

After Upgrade to V5R3 on the 270 server:

driver=native no longer works.  The driver fails to initialise.  We are
able to work around this problem by removing the driver=native parameter
from the url.  However, given that our application does bulk updates, we
need to squeeze as much speed out of the system as possible.  If there
is a way to get driver=native to work correctly, then I need to know.

There is no indication of Deprecation for this class and our parameters
conform to the requirements shown in the IBM website:
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp
(Search for AS400JDBCDriver and choose the first entry)

Problem 2

Under OS400 V5R1 the following works:

i) get the Connection connection using the Connection class

ii) use connection.prepareCall(sql) to prepare a callable statement

iii) get the CallableStatement cstmt using the CallableStatement object
returned from ii).

iv) set the CallableStatement parameters using the cstmt.setString,
cstmt.setInt etc methods.

v) Once parameters are set, use the cstmt.addBatch() method to add sql
statements and data to the CallableStatement batch vector.

vi) Once a batch of statements has been loaded (in this case we set the
batch size to 10 for testing purposes), use the executeBatch() method to
run the update sql we had loaded.

Under OS400 V5R3 we get the following problem:

For the first batch, everything works.  For the second batch we found
the following under debug:

(1) Steps i, ii, iii, and iv work fine.  Under step iv the correct
parameters are loaded and can be seen to be loaded, but ....

(2) at step 5, the batch vector starts as null.  When the addBatch
method is executed, somewhere in the classes behind the scenes, instead
of the parameters we have just loaded being added to the batch vector,
the last set of parameters from the previous batch are loaded instead.
When the executeBatch method is executed, this results in a Duplicate
Key issue.

This testing was done from Websphere Development Studio Client for
iSeries version 5.1, Build id: 20030908_2154 connected to the AS400.
The JRE is 1.4.2_01 on Windows XP.  It connects to the AS400 using the
JT400.jar which was updated to the new one from the AS400 (now V5R3).
I.E. the only thing that has changed is AS400 Java Tool Box and the
AS400 operating system.  Is there a fix for this or a work around?
Please help. 


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.