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



Hey Everyone,



Well, I'm trying to use Scott's JDBC code for RPG (For everything else
it works great Scott. Great learning tool as well.) to place the
contents of a DB2/400 table into a flat file in the IFS.



Everything works just fine up to the point of jdbc_ExecUpd() on
statement SELECT * INTO OUTFILE /home/mydir/myfile.txt FROM MYLIB/MYFILE
on our V5R4 system. I'm using jtopen rather than the installed Java
SDK.



I keep getting a RNX0301 error - Java exception received when calling
Java method.



Message ID . . . . . . : RNX0301 Severity . . . . . . . : 50


Message type . . . . . : Escape


Date sent . . . . . . : 05/05/11 Time sent . . . . . . :
15:16:53




Message . . . . : Java exception received when calling Java method.


Cause . . . . . : RPG procedure JDBC_EXECU in program MONNIG/JDBCR4
received

Java exception "java.sql.SQLException: [SQL0104] Token OUTFILE was not


valid. Valid tokens: :. Cause . . . . . : A" when calling method


"executeUpdate" with signature "(Ljava.lang.String;)I" in class


"java.sql.Statement".


Recovery . . . : Contact the person responsible for program
maintenance to

determine the cause of the problem.


Technical description . . . . . . . . : If the exception indicates
that the

Java class was not found, ensure the class for the method is in the
class

path. If the exception indicates that the Java method was not found,
check

the method name and signature. If the signature is not correct, change
the

RPG prototype for the method, or change the Java method, so that the
return

type and parameter types match. You can determine the signatures for
all the

methods in class XYZ using command QSH CMD('javap -s XYZ').



Abstract class executeUpdate is in class java.sql.Statement. Here's the
QSH output.



public abstract int executeUpdate(java.lang.String);

throws java/sql/SQLException

Signature: (Ljava/lang/String;)I



We are running



java version "1.4.2"

Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_19-b04)

Classic VM (build 1.4, build JDK-1.4, native threads, jitc_de)



Was SELECT * INTO UPDATE /flatfilename introduced in a more recent
version, am I doing something incorrectly or both?



Thanks in advance,



Gary Monnier




As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.