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



midrange-l-request@xxxxxxxxxxxx wrote:

>   7. Re: subject: RE: subject: pgm that triggered the trigger pgm?
>      (Douglas Handy)
>
>>how do _know_ someone didn't simply use UPDDTA to change the program name in 
>> the record?
>
>
>On some of my files I have *BEFORE triggers with ALWREPDTA(*YES). The 
>trigger updates the buffer with the date/time and user ID, so even using 
>UPDDTA results in it getting updated. If the file had a field reserved for 
>the program name, the trigger could get that easily too and update it as 
>well.

Doug:

Understood about triggers, but I don't see how that really helps in this case 
-- unless a separate transaction history record is written by the trigger 
program, in which case you might as well just use journalling.

Part of the point is that the UpdPgmName field only exists once per record. If 
I run PgmA and update the record, then the value 'PGMA' gets stored in the 
field. If I then use UPDDTA or whatever against the same record, the 'PGMA' 
value is overwritten and lost. I'm curious how you _know_ what program did any 
updates. (...unless a transaction history is created and it's also got a 
trigger or other tracking/audit mechanism, etc.)

I don't recall that you made the original comment, but you might have a more 
complete answer.

Tom Liotta


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.