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



1- It is a good idea to have the trigger progrma in the same library as the file. It makes back-up easier.
2- when ataching the trigger, use the library, not *LIBL.
3- In the program, write the library for each file in the "extfile" option.
4- Use the Owner's autority for all the objects.
5- Use Monitor or %error in all operations.



Glenn Melville wrote:

Hi All,

I am trying to make a trigger program as resilient as possible.

Lets imagine you have a file called ABC which triggers program XYZ on insert. This creates a couple of interesting problems...

(1) You must ensure that the triggered program has all objects it requires in the library list.

(2) What happens if someone use UPDDTA without file ABC being in the library list, i.e. UPDDTA MYLIB/ABC.

and so on...

Does anyone have any ideas that would allow a program to be triggered from anywhere but still run successfully. So far I have considered...

(1) Placing the trigger program in the same library as the file it is triggered from.

(2) Using a generic trigger program that sets the correct library list using either a job description or library list held in a common file linked to the library/file/member/trigger type/trigger time.

The purpose is to stop trigger programs from falling over due to objects not being available as well as making the config of them flexible.

Thanks in advance.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.