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



Hi
thanx for the information,
Does any one have code example or PDF about
calling Java program from RPG where i can pass
parameters from RPG to java and back to RPG, i would
like to pass a String and result set (SQPRPGLE
program) cursor from RPG to java and a String from
java to RPG
Ashish
--- "A Cruz Jr." <acruzjr@xxxxxxxxx> wrote:
> Ashish, here are some of the answers to your
> questions:
> Hope it helps you get started with Java programming
> in
> the AS/400 - iSeries. I assume you already know the
> AS/400:
> 
> If the JDK is properly setup in your iSeries, here's
> the quickest way to check the Java version:
> 
> a. From the command line, type QSH
> b. type java -version, you should see something like
> this:
> 
>                            
>   $                        
> > java -version            
>   java version "1.3.1"     
>   $                        
>                            
> 
> OR from the command line
> 
> a. type "go licpgm"
> b. type 10 "Display installed licensed programs",
> scroll/page down until you see something like this:
> 
>  5722JV1   *COMPATIBLE  Developer Kit for Java      
>  5722JV1   *COMPATIBLE  Java Developer Kit 1.2      
>  5722JV1   *COMPATIBLE  Java Developer Kit 1.1.8    
>  5722JV1   *COMPATIBLE  Java Developer Kit 1.3      
>  5722JV1   *COMPATIBLE  Java Developer Kit 1.4      
> 
> 
> 1. How can i develop java program on AS400 , i
> would like to create programs in IFS some folder,
> 
> Start here, click on Programming, then click on
> Java...
> 
> iSeries Information Center
>
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm
> 
> 2. Setup CLASSPATH, 
>
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzaha/classpth.htm
> 
> 3. call these java programs from RPG, refer to the
> iSeries Information center for more info. on this.
> 
> *** Here's how we call the Java program from a CL
> ***
> 
> RUNJVA CLASS('JavaClassName') 
>               CLASSPATH('/users/directory')  
> 
> 4. Call Java program and create a JDBC Connection
> object with out having the user to relogin, i.e. use
> native JDBC driver
> 
> ************************************
> Here's the code snippet: More info./example in the
> iSeries Information Center
> ************************************
> 
> // make sure you put this above with the other
> import
> // statements
> import com.ibm.db2.jdbc.app.*; 
> 
> 
> // This is the code for the JDBC
> // This is the connection info. for DB2 on the
> AS/400
> sourceURLDB2 = "jdbc:db2://iseriesname";
> Class.forName("com.ibm.db2.jdbc.app.DB2Driver");
> db2conn = DriverManager.getConnection(sourceURLDB2);
> db2conn.setAutoCommit(false);
> Statement stmtDB2 = db2conn.createStatement();
> 
> 
> Call the Java JDBC objects just like any other
> objects
> from platform(s).
> 
> Good luck,
> Angelito
> 
> 
> _______________________________________________
> 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.
> 


__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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.