Currently i'm writing programs which involves access to DB2 tables via SQLJ. One of the development aim is to make the source code transparent (i.e. able to run in both OS/390 platform and PC platform).
However, when i tried to develop SQLJ code which involve uncomitted read (UR) - we experienced problem in PC platform. The SQL below
SELECT COUNT(CTRY) INTO :numberOfRecords
FROM VICQITM QITM, VICSVMP SVMP WHERE QITM.MSG_NAM IN
(SELECT MSG_NAM FROM VICQITM WHERE QUE_ITEM_ID = :queueItemID)
WITH UR
can be successfully translated in both PC and OS/390 platform. While in OS/390 platform is able to execute the program without any problem, in PC (currently in Windows 2000 Prof running VisualAge for Java as IDE) it returns a SQL exception which states there is error in token:
COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0104N An unexpected token "WITH" was found following "E QUE_ITEM_ID = ? )". Expected tokens may include: "<concat>". SQLSTATE=42601
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.sql.SQLException(java.lang.String, java.lang.String, int)
COM.ibm.db2.jdbc.DB2Exception(java.lang.String, java.lang.String, int, byte [])
COM.ibm.db2.jdbc.DB2Exception(java.lang.String, java.lang.String, int)
void COM.ibm.db2.jdbc.net.SQLExceptionGenerator.throw_S QLException(COM.ibm.db2.jdbc.net.DB2Statement, boolean)
void COM.ibm.db2.jdbc.net.SQLExceptionGenerator.check_r eturn_code(COM.ibm.db2.jdbc.net.DB2Statement, int, boolean)
void COM.ibm.db2.jdbc.net.SQLExceptionGenerator.check_r eturn_code(COM.ibm.db2.jdbc.net.DB2Statement, int)
COM.ibm.db2.jdbc.net.DB2PreparedStatement(java.lan g.String, COM.ibm.db2.jdbc.net.DB2Connection, int, int)
COM.ibm.db2.jdbc.net.DB2PreparedStatement(java.lan g.String, COM.ibm.db2.jdbc.net.DB2Connection)
java.sql.PreparedStatement COM.ibm.db2.jdbc.net.DB2Connection.prepareStatemen t(java.lang.String)
sqlj****ntime.profile.RTStatement sqlj****ntime.profile.ref.JDBCProfile.prepareStatem ent(java.lang.String)
sqlj****ntime.profile.RTStatement sqlj****ntime.profile.ref.JDBCProfile.getStatement( int)
sqlj****ntime.profile.RTStatement sqlj****ntime.profile.ref.ProfileWrapper.getStateme nt(int)
sqlj****ntime.profile.RTStatement sqlj****ntime.profile.ref.IterConvertProfile.getSta tement(int)
sqlj****ntime.profile.RTStatement sqlj****ntime.profile.ref.ProfileWrapper.getStateme nt(int)
sqlj****ntime.profile.RTStatement sqlj****ntime.profile.ref.UntypedSelectProfile.getS tatement(int)
sqlj****ntime.profile.RTStatement sqlj****ntime.profile.ref.ProfileWrapper.getStateme nt(int)
sqlj****ntime.profile.RTStatement sqlj****ntime.profile.ref.ParamRegProfile.getStatem ent(int)
sqlj****ntime.profile.RTStatement sqlj****ntime.profile.ref.PositionedProfile.getStat ement(int)
sqlj****ntime.profile.RTStatement sqlj****ntime.profile.ref.TransactionControlProfile .getStatement(int)
sqlj****ntime.profile.RTStatement sqlj****ntime.ExecutionContext$StatementStack.setSt atement(sqlj****ntime.profile.ConnectedProfile, int)
sqlj****ntime.profile.RTStatement sqlj****ntime.ExecutionContext.registerStatement(sq lj****ntime.ConnectionContext, java.lang.Object, int)
void study.URTest.readCount()
void study.URTest.main(java.lang.String [])
Could anyone here please help what's going and how to fix the problem. Thanks in advance.