• Subject: Re: Commit or Journal?
  • From: DAsmussen@xxxxxxx
  • Date: Fri, 19 Sep 1997 20:04:29 -0400 (EDT)

Dave,

In a message dated 97-09-19 08:29:01 EDT, you write:

> Dean Asmussen (DAsmussen@aol.com) wrote:
>  
>  >The timestamp can be inadequate unless you're using the new
>  >"extended length" time -- my old employer had (packaged) programs
>  >start blowing up when the "D" models came out because some of
>  >them based unique keys on the old "TIME" keyword. Seems the "D"
>  >facilitated processing multiple records within the same second.
>  
>  Dean,
>  
>  Yes, several records could contain the same timestamp value, but that
>  doesn't really matter for this purpose. We're only concerned with
>  multiple updates to the same record in an interactive process. To get a
>  double update here, the record would have to be updated, read by 2
>  different users, then updated again by one of them, all before the
>  timestamp value had moved on. Is this feasible? I doubt it, but it's a
>  valid point.

But the possibility exists, nonetheless.  We have an application that was
once using this exact method.  After at least six developers (and some TWICE)
spent HOURS poring over problems with it, we changed it to use the extended
time stamp.  Amazing that the problem hasn't recurred since.  In a large
system performing real-time updates, the odds on this happening go up
exponetially.

>  It was the full 26 position timestamp that I had in mind, but I'm not
>  sure it makes any difference. Don't the micro-seconds always get
>  generated as zero by RPG programs, at least on CISC machines? So if you
>  believe the above scenario is possible the extended timestamp doesn't
>  help.

That's the one that I was proposing, as opposed to the six-digit version
available with standard RPG/400.

>  >Method 3?
>  
>  Method 3 is to have an update counter in the master file record and test
>  that. It would be set to zero on first write and then incremented every
>  time the record is updated. It then doesn't matter how close together
>  the updates come. You might want a timestamp on the record anyway, so
>  it's a pity to have to have an extra field. If there were a way of using
>  the micro-seconds part of the timestamp as the counter it could be quite
>  neat. The stored micro-second value would be a fiddle, but how
>  meaningful a value is it anyway? However, I'm not sure it's possible in
>  RPG.

As long as it's the 26 digit version, I have no problems with that...

Regards,

Dean Asmussen
Enterprise Systems Consulting, Inc.
Fuquay-Varina, NC  USA
E-Mail:  DAsmussen@AOL.COM

"Everywhere is walking distance if you have the time." -- Steven Wright
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MAJORDOMO@midrange.com
|    and specify 'unsubscribe MIDRANGE-L' in the body of your message.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


This thread ...


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

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