|
Does the called program need to communicate back to the calling program? If not then stop calling the called program. Instead, write out to a data queue. The second program would access this data queue. If you send a dummy 'QUIT' record to the dataqueue have the queue processing program shutdown. Not only will this allow a graceful shutdown, but, it should speed the file processing up because no longer are the updates waiting on the called program to process the data. Once you've gone data queue, you'll never go back. Rob Berendt ================== A smart person learns from their mistakes, but a wise person learns from OTHER peoples mistakes. "Mike Silvers" <msilvers@HBS-INC To: "RPG400-L" <RPG400-L@midrange.com> .COM> cc: Sent by: Subject: Trigger Problem owner-rpg400-l@mi drange.com 05/25/01 07:13 AM Please respond to RPG400-L All, I have a trigger program on a file. I have a few problems with the program and locks on files. Here is the situation..... I have a trigger program written in RPG that is attached to a file. The trigger program looks at the value of a data area and, depending on the value of the data area, either calls a program to do some work, or does not call the program. The program ends with a RETURN and does not use the default activation group. The second program is where the problem lies. The second program updates and reads some files. When it completes, it returns without setting on LR. This was done for performance, because the file accesses will be high in number and there are other trigger programs from another consultant on this file. The intent of this process is that by changing the value of the data area, we can isolate the program that does the work from the trigger calls. We can then change the program, if needed. Here is the problem: if the program that does the work is called one time, there is a lock placed on the program (in other words, the object is allocated). If we turn off the data area so the program that does the work is not called anymore, the lock still exists. This is the problem. Does anyone have any suggestions on how to resolve the locking issue (other than having the users sign off -- that is not an option)? Thanks! Mike ================================ Mike Silvers AS/400 Senior Programmer/Analyst AS/400 IBM Certified RPG IV Developer AS/400 IBM Certified Solutions Expert Hainey Business Systems 8 E. Canal St Dover, PA 17315 Branch Office: (410) 397-8739 Phone: (800) 932-3380 Fax: (717) 292-9474 Web: http://www.hbs-inc.com ________________________________ Providing E-Commerce, EDI, AS/400 Development and related services nationwide. ================================ +--- | 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 +--- +--- | 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 mailing list archive is Copyright 1997-2025 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.