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



I see that you received lots of responses about using a trigger.  I
understand your concern about performance.   If you add lots of records in
batch, you will have a performance hit.  If you add one at a time via
interactive session, don't worry.

Since you do not want to change the existing application, I would use the
trigger as an after insert.  There is really not that much overhead if it is
coded correctly.

First create a function that returns a Boolean perhaps called
fJobIsInteractive.  This would let you know when the job is interactive and
you can call a window program to display your error message.  Then the test
would be:

If fJobIsInteractive  (return true or false)

call window program with error message information

EndIf

With the trigger only testing the data in the buffer and calling external
function that perhaps sit in a service program, your program will be small
and efficient.

This is where you would call the program to put up the error window.  If the
proper condition exists, send the after image to a data queue for further
processing.  You now have a small program with very little overhead.  If
file library not equal to a production library, i.e. Qtemp, goto end of
program.  (Our safety net for those programmers who crtdupobj to qtemp for a
work files.)

The less the trigger does itself the better.  That is why we like to send
the data somewhere else to be processed by a separate batch job, generally a
data queue server job in our shop.


HTH

Christopher K. Bipes    mailto:ChrisB@Cross-Check.com
Sr. Programmer/Analyst  mailto:Chris_Bipes@Yahoo.com
CrossCheck, Inc.        http://www.cross-check.com
6119 State Farm Drive   Phone: 707 586-0551 x 1102
Rohnert Park CA  94928  Fax: 707 586-1884

If consistency is the hobgoblin of little minds, only geniuses work here.
Karen Herbelin - Readers Digest 3/2000

-----Original Message-----
From: Mike Silvers [mailto:msilvers@hbs-inc.com]
Sent: Wednesday, March 28, 2001 4:28 AM
To: RPG400-L
Subject: Interesting Situation


Hi All.

I have a situation I was wondering if you could help.  I have a client that
is using a specific package.  I am not allowed to modify the package in any
way.  The package writes a record to a file and, dependent on the value of a
specific field, we need to process the information separately.  If specific
conditions are met, the record is processed in our system along with the
package system.  If these conditions are not met, a window is to be
displayed indicating the error.

Without modifying the package, does anyone have any ideas on how to
accomplish this task?

Thanks

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

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.