Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use java app from 4GL

Status
Not open for further replies.

chandru97

Programmer
Dec 23, 2005
1
US
Hello,

I need help using java from 4gl app. Here is my current scenario. We have a java app running all the time on the unix server looking for a new record entry on a Informix table. 4GL app creats a record in a staging table and waits for the java program to pick up and get the result back .

The java app reads the record and uses web services to get data from external resource and creats result record in the table. 4GL app picks up this record.

Is there any way I could call java from 4gl directly instead of using the staging table ? I want to instentiate the java one time and call the java method everytime I need data.

Is there any IPC machanism available in 4gl ?

Thanks,
Chandra.
 
You may not truly integrate your Java app into 4GL, such a functionality does not exists in 4GL. You may think on following terms to gather outputs generated from Java app to 4gl.

1. Use RUN statement to execute Java app
2. Let Java app write the output to a file
3. Load output in to temp table(s)
4. Onward processing...(your business logic)

more info:
thread876-1071770
 
While the RUN a program, load the output into a temporary table works, I've never cared for it. While Informix 4GL doesn't interact with the Unix OS, you can use my "C" functions which can execute external programs as a pipe and read the pipe thus removing the need for temporary tables.

The code and an explanation are available at this FAQ in the Informix Dynamic Server forum:

faq179-2007
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top