|
Hi Viji - >I find that the file is locked by the job/s and that I >cannot access the file for maintenance / housekeeping >unless the job/s are ended... Is there a way to ensure >that the file is closed once the program that initiated >the trigger ends? The way I would handle is this is to have the trigger program on each call check the number of parameters passed. If it is zero, set on LR and end. If it is not zero, do the normal processing. Then in every program that could cause the trigger program to be activated; when that program goes to end, do a manual call to the trigger program with no parameters. This will cause the trigger program to close its file and shut down. Another possibility is to use activation groups. When the activation group that the trigger program is in is destroyed, all of the files will be closed. The advantage of the first method is that it will work with non-ILE programs as well as ILE programs, and you don't have to worry about overrides and OPNQRYFs not working properly, etc. Ken Southern Wine and Spirits of Nevada, Inc. Opinions expressed are my own and do not necessarily represent the views of my employer or anyone in their right mind. +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-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.