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



I have used the RPGLE Class example. I instead tend to use a technique
where:

1) create RPGLE program with *ENTRY
2) create CLPLE with the same signature, that calls the RPG
3) create a sql procedure to call the CLPLE with the same signature
4) in the Java class I use sql to call it, and it returns the values

connection =
getAS400JDBCConnection(accinfo.getSystem(), accinfo.getLibraryList());
stmt = connection.prepareCall("Call
LIBRARY/ACCINFO(?,?,?,?,?,?,?,?,?,?,?)");

stmt.setString(1, accinfo.getSystem().trim());
stmt.setString(2,
accinfo.getUser().toUpperCase().trim());
stmt.setString(3,
accinfo.getCompanyId().toUpperCase().trim());
stmt.setString(4,
accinfo.getEmployeeNbr().toUpperCase().trim());

stmt.registerOutParameter(5, Types.CHAR); //
realName
stmt.registerOutParameter(6, Types.CHAR); //
expDate
stmt.registerOutParameter(7, Types.CHAR); //
accDisable
stmt.registerOutParameter(8, Types.CHAR); //
accLocked
stmt.registerOutParameter(9, Types.CHAR); //
passExp
stmt.registerOutParameter(10, Types.CHAR); //
passChg
stmt.registerOutParameter(11, Types.CHAR); //
passAlow

stmt.execute();

For me, it feels simpler and more readable than the RPGLE pieces.

Kristen


-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Joe Pluta
Sent: Wednesday, July 27, 2011 1:53 PM
To: Java Programming on and around the IBM i
Subject: Re: JTOpen problem from JNI

I'd suggest starting here:

http://publib.boulder.ibm.com/infocenter/iadthelp/v7r0/index.jsp?topic=/com.
ibm.etools.iseries.pgmgd.doc/c0925076171.htm

Joe
Den 27/07/11 19.27, Joe Pluta skrev:
Also, why are you using JNI instead of the RPG *JAVA support? It seems
like an awful lot of work.
Is there a good introductory text to this facility? I am primarily
interested in being able to run a program and retrieve values from it.

Thanks,



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.