× 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.



John,

I may have an answer for the first problem.  Is the QCCSID system value on
your iSeries set to 65535?  (i.e. check DSPSYSVAL QCCSID).

If so, then V5R3 no longer allows the native JDBC driver to make database
connections from jobs with CCSID 65535.  We ran into the same problem
upgrading from V5R2 -> V5R3.  We were using the native driver directly so
there was an obvious error in the job log about it.  I'm not sure what
error you may or may not see when trying use the native JDBC driver via the
Toolbox driver and specifying driver=native.

It didn't cause us a huge amount of grief because we already planned to get
everything moved across to using the Toolbox driver anyway (and the toolbox
driver still works connecting from jobs with CCSID 65535).  If you must use
the native driver, the solutions I'm aware of are:

1) Change the job description of however you are running the Java program
to specify a valid CCSID
2) After the job starts, issue a CHGJOB CCSID(x) to specify a valid CCSID
before starting the Java pgm
3) Change the QCCSID system value

There's info about it in:

http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/rzaq9/rzaq9.pdf
(see at bottom of page 24)

Can't help at all on the second problem I'm afraid, I've never used batch
updates.

Hope this helps,

Nigel Gay,
Computer Patent Annuities.



                                                                           
             "Herbert, John M"                                             
             <john.herbert@eds                                             
             .com>                                                      To 
             Sent by:                  <java400-l@xxxxxxxxxxxx>            
             java400-l-bounces                                          cc 
             @midrange.com                                                 
                                                                   Subject 
                                       AS400JDBCDriver Issues              
             19/04/2006 21:47                                              
                                                                           
                                                                           
             Please respond to                                             
             Java Programming                                              
             on and around the                                             
              iSeries / AS400                                              
             <java400-l@midran                                             
                  ge.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.

--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.





********************************************************************************
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee; access to this
email by anyone else is unauthorised.

If you are not the intended recipient: (1) you are kindly requested
to return a copy of this message to the sender indicating that you
have received it in error, and to destroy the received copy; and (2)
any disclosure or distribution of this message, as well as any action
taken or omitted to be taken in reliance on its content, is prohibited
and may be unlawful.
********************************************************************************


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.