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



A few ideas that haven't been mentioned yet (all my opinions of course and maybe not best for your situation) :

Poorest method: Trigger pgm. Using a trigger program is basically re-inventing the journal system that is free with OS400. Why re-invent the wheel when you already have it? Plus it can be more complex; you have to make a trigger management shell to turn on & off triggers when doing housekeeping, promotions, etc. File locks can be an issue. OS400 journaling handles all that stuff already.

Middle best method: journaling. But you probably need to write pgms to farm the journals, comparing BEFORE to AFTER images and writing hybrid LOG records to your log file showing who changed what and when, etc.

BEST method: Skip triggers and journals and all the associated junk with them; rather make a really good PRICE file with time sensitivity.

This is probably the toughest method (because of pgm changes), but IMO is by far the best.

Here is an example - I hope this has some applicability to your situation:

Current price record example: who changed the %#@* price from $3 to $4 ??? Very difficult to know. Even with journals, logs, triggers, one would have to look at another file to find out. And what if December's price will be $5. How to report that easily with one pgm module?

Item price
123 $4


NewPriceFile example: here is the best method of accomplishing what you described:


Start entered entry
Item price date by add date
123 $3 2013-01-01 JohnDoe 2012-12-01
123 $4 2013-08-01 SallyMae 2013-07-01
123 $5 2013-12-01 MortieMax 2013-11-01


Clear as mud?

You would need a price routine to look up price by date. But no need for journals, logs, triggers, complex logic. Everything flows simply, and all changes for past & future are in the price file. Maybe there is a name for this type of file??

Hope that helps!







-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jeff Crosby
Sent: Wednesday, October 30, 2013 2:44 PM
To: Midrange Systems Technical Discussion
Subject: Log file of file changes

All,

We had an issue recently about how a couple of prices got changed. The
salesrep (who has _some_ control over pricing) says he didn't do it, and no
one in the office remembers doing it. In fact, it was the sales rep who
brought it up wanting to know what the %#@* is going on? :) By looking at
month end backups, I know it happened sometime in August. Nothing like
bringing it to our attention on a timely basis, right?

Anyway, in discussing it, the buying VP suggested a log file of changes. I
think it's a great idea and it seems to me to be an ideal use for a
trigger. Whenever a record is added/updated/deleted, just have the trigger
write the record to this log file. It can have the same record layout as
the file in question, plus add a few fields such as user and timestamp.
Seem reasonable? I've never written a trigger before but I can figure it
out.

The file is currently journaled, but that's not really what journaling is
for, IMO.

Thanks for any ideas.


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.