RPG/400 Trigger Program

5 pts.
Tags:
AS/400
AS/400 triggers
iSeries
RPG/400
RPG/400 trigger program was suggested to develop a moving average computation. There's a rule that needs to be followed when posting a record in the computation. One rule is that all credit transactions be first posted in the computation - Is this possible in a trigger program? How could I implement this rule?

Software/Hardware used:
RPG/400, iSeries

Answer Wiki

Thanks. We'll let you know when a new response is added.

Elm021564 -

One thing to remember about trigger files; they are expensive!

The Trigger program runs in line with the current process. Can the user wait for the process to finish?

Trigger files are not field sensitive. You make a change to the FILE and the trigger responds. If you do not care if that field changed – Sorry, it launched a job.

OOPS! Do not forget about Object security.

Phil

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    We can't answer the question without knowing the structures of any tables that are involved and the relationships between them. What file is the trigger program associated with? How is the "moving average" calculated -- where do the values come from? Once the calculation is done, where should the "moving average" be stored? Tom
    125,585 pointsBadges:
    report
  • DanTheDane
    If the triggered proces (= triggerprogram) involves manu file-lookups, the penalty may be increased responsetime for the users. If you create a dataqueue and simply lets the tiggerpgm add a record with proper data to initiate the computations, file-accesses a.o., your triggered program will not be notably slower. Then create a program which reads the dataqueue, and does the processes needed. This pgm shall then be started as a batch-job. This designmodel has worked for one of my customers for several years, and they have never had any problems with this second solution for the job. The first solution, was a traditional triggerpgm doing all the lookups etc - at that did'nt work for them. DanF
    2,555 pointsBadges:
    report
  • Elm021564
    [...] RPG/400 Trigger Program [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following