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



Here's an approach I saw at a customer recently...

Journal the database files, before and after images. Then create a exit
program for RCVJRNE that generates the INSERT, UPDATE and DELETE
statements.

This particular customer logged the SQL statements with date/time stamps
into a physical file. Then another ODBC or JDBC retrieval was used to
execute the statements on the external database.


Hth,

Ken Slaugh (707) 795-1512 x118 
Chouinard & Myhre, Inc. 
http://www.cm-inc.com/ 

 

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Glenn Holmer
Sent: Wednesday, October 05, 2005 9:31 AM
To: java400-l@xxxxxxxxxxxx
Subject: trigger or listener?

We want to have a Postgres database on a Linux web server updated when
the corresponding record on the AS/400 changes.  We are thinking:

a) DB trigger on the '400 that wakes up when the record is changed and
calls a Java program (also on the '400), passing the needed parameters
as arguments to main(); the Java program uses JDBC to update the
Postgres database on the Linux server.  Pro: probably easy to set up,
Con: new process spawned for each write.

b) A Java program that runs all the time and listens for changes on the
AS/400 database using something like FileListener from the JT400 toolbox
(haven't researched this yet); he would do the same as a).  
Pro: single program, Con: don't know if it's possible.

What recommendations would you guys make?  We are hoping to get away
without modifying the program that is actually making the changes on the
'400.  We are not talking about a huge number of records here; probably
a couple hundred every few hours.

--
____________________________________________________________
Glenn Holmer                          gholmer@xxxxxxxxxxxxxx
Software Engineer                        phone: 414-908-1809
Weyco Group, Inc.                          fax: 414-908-1601
--
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.