Hi tim,

I do the same like you.
Here is tjhe way i do it:

for each file that i want to log :

* I store the fileds on wich the changes must be logged
* In my trigger pgm (a generic one)
o i make a test to see if the position of the buffer for each
field selected has changed
o If so i store the all the buffer (before and after) in two
varying fields ( max of 5000 char)
* i had a little prog to manage these logs.

in my case, i have no need to compare each fields, only the buffer position (based on the fil description)
And to add a file, i only promot the liste of fields, and store the selected one.

Hope this help

tim a écrit :
I have a trigger program to log any changes in a file. Here is snippit:

D OldRecord E DS ExtName(filea)
D Prefix(O_)
D Based(OldRecPtr)

D NewRecord E DS ExtName(filea)
D Prefix(N_)
D Based(NewRecPtr)

if n_name <> o_name;
if n_salut <> o_SALUT ;
writediff('Salutation' : o_SALUT );

I repeat this logic for each field in the file. If I have a file with many
fields, it can be quite tedious.

I was wondering if this could be done a different way so that as I add more
files to this logging process, all I would have to do is change a file name
or something. I was thinking it would have something to do with pointer
logic, but not sure where to start.


This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 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].