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


  • Subject: Re: Tricks to get output from Java to ODBC caller?
  • From: dawall@xxxxxxxxxx
  • Date: Thu, 10 Feb 2000 12:21:32 -0600

No one else responded so I will throw in my two-cents worth.  One approach
would be to route standard out/error to a place accessible by the caller.
The AS/400 JVM has properties that tell it to reroute standard
in/out/error.  You could reroute standard out to a port that the caller is
listening to, or reroute it to a file that is read by the caller.  Another
approach is to use one of the AS/400's IPC mechanisms (Data Queues, User
Spaces, Data Areas, ...) to pass information from the Java program to the
caller.  A third approach would be to write data to a temporary database
file then signal the caller to read the data.  I realize the first two can
be messy.  They assume a program between the Java program and the ODBC
program that would help get data back to the ODBC program (probably the "C"
stored procedure you talked about in your note).

David Wall
AS/400 Toolbox for Java

Please respond to JAVA400-L@midrange.com

To:   "L-JAVA400@midrange.com" <JAVA400-L@midrange.com>
cc:
Subject:  Tricks to get output from Java to ODBC caller?




We have put a call to a Java program into a CL program in order to call it
from ODBC (actually, we may have been able to bypass the CL program
altogether, but that is not important) using CALL QSYS.QCMDEXC.

Does anyone know a way to get output from a Java program? We would like to
run the java program and get some output from it to return to the calling
application. The caller would use ODBC or JDBC (solution must support both
in this case, not just JDBC) and stored procedures with input/ouput params.

I would be able to write a C stored procedure which in turn could call the
java program, but I also do not know how to get java output to a C program.

Any ideas?

luther.miller @ hypere.com


+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---



+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

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.