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



On 24-Mar-2015 08:52 -0500, (WalzCraft) Jerry Forss wrote:
On 24-Mar-2015 08:32 -0500, (WalzCraft) Jerry Forss wrote:
I migrated a vendor package to a new version.

When I check the file usage in the old version (Different library)
there is a file that is still being accessed that shouldn't.

There are multiple ways files are accessed including Stored
procedures, Crystal Reports and MS SQL code.

Is there a way to put a trigger on the file so when it is accessed
I will know about it? The file is NOT being updated, just read.

I can rename/delete the file and HOPEFULLY the offending code will
blow up. Just wondering if there is a trigger option.

<<SNIP>> It will help but was hoping for a more immediate
notification of access.

FWiW the topic is irrespective of [High Level] Language coding, so is really unrelated to the RPG; directing a topic to a forum specific to a language limits the audience, both of those who can assist and of those who can benefit from the discussion as followers of that forum.

There are many ways, aside from passive methods such as journaling or auditing that could assist in the described scenario. The rename of the file, as already proposed, being very likely to expose immediately and conspicuously any program still dependent. However most such active [vs passive] methods depend upon both how the file is opened by the code and how the code responds to the potential condition, thus the *hopefully* remains an issue. For example, even a Read Trigger would fire only if a data record was actually accessed and similarly for an INSTEAD OF TRIGGER to fire, and use of an IOT also requires that the program opening the file could open the VIEW instead of whatever the type of DataBase File is currently. Anyhow, the _known_ likely is not that the file is being read, but instead that the file is opened [and closed] per last-used tracking is what is known; i.e. that the file is being read rather than just opened, is likely only presumed.?

The one means to assuredly determine and be able to notify of the open [for intent-read] is to use the Open Database File Exit Program feature; the exit program could *actively notify* upon the request to open, and before the open actually transpires with the option to prevent the open activity. In combination with Change Object Auditing (CHGOBJAUD), the impact to the system typically can be limited [unless files and\or users are already audited.
<http://www.ibm.com/support/knowledgecenter/api/content/ssw_ibm_i_71/apis/xopendbf.htm>
_Open Database File Exit Program_
"...
The Open Database File exit program is called when a job is opening a database file. This exit is called in the job that is attempting to open the file. The exit program is passed a list of files referenced in the open request and the open options. The exit program may set a return code value to end the open request. When an open request is issued, the operating system calls the user-written exit program through the registration facility. ...
..."


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.