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



What I have done for cases like this is to create a java program which
runs in a separate job. I write the SQL statement to be run to a data
que from the program that needs the information; the java program runs
the sql statement and writes the row (or rows) to a keyed data que the
original program is reading from (the key is the original program's job
indicator so that multiple jobs can use the same que).

You can avoid the overhead of invoking the program an making a
connection for every row you whish to retrieve; which can be
significant.

If you are interested I can dig up an example.

 

-----Original Message-----
From: java400-l-bounces+jehimes=liberty.edu@xxxxxxxxxxxx
[mailto:java400-l-bounces+jehimes=liberty.edu@xxxxxxxxxxxx] On Behalf Of
Kelly Cookson
Sent: Wednesday, October 26, 2005 11:48 AM
To: Java Programming on and around the iSeries / AS400
Subject: Passing parameters between Java and CL/COBOL/RPG programs

I have developed a Java program that runs on the iSeries and uses a JDBC
driver to establish a connection to an SQL Server database on a windows
machine. 

Here's what I'd like to happen: 
(1) A CL (or COBOL or RPG) program calls a Java program on the iSeries.
(2) The Java program uses JDBC to retrieve a single row from a table in
the SQL Server database.
(3) The Java program passes the value of one field from the row back to
the CL (or COBOL or RPG) program that called it.

Has anyone done something similar? Would you be willing to share an
example?

Thanks,
Kelly

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



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.