|
Nelson, Thanks for the kind words! As far as I understand things, the SQL implementation insists on accuracy down to that level whereas the RPG implementation isn't constrained by international standards. I am on V4R3, but I believe that this has been true for as long as the TIME field has been supported by OS/400. As for the current situation where the "uniqueness" comes from a timestamp, all I can say is that I hope Murphy's Law doesn't strike. I've seen duplicate timestamps using RPG. It's rare, but remember that the purpose of the TIME opcode is not to create a unique key - it is to return the time of day. I don't think that anybody guarantees that two calls to TIME will create two different values. This same would be true for SQL's CURRENT TIMESTAMP. Buck Calabro Aptis; Albany, NY > -----Original Message----- > From: Nelson C. Smith > Sent: Thursday, January 20, 2000 5:03 PM > To: RPG400-L@midrange.com > Subject: Re: Timestamp field > > I have way too much respect for you to dispute what you are saying, Buck, > but I was just wondering.... Why would the SQL timestamp function be any > more accurate than the RPG TIME opcode? In the past, I've had just the > exact opposite problem. The RPG opcode would give a good, completely > accurate timestamp and SQL would not. > > All my audit files use the timestamp as the final unique key (in addition > to > whatever key the masterfile used), and we've never had a duplicate key on > any of our machines (up to a 4-way), except when *LOVAL was being written > (in error). Of course, I don't know of any applications that write or > update the very same record over and over again quick enough to cause such > a > problem, so I suppose it's possible we just haven't hit one yet. We have > had quite a lot of problems, however, using SQL to write records with a > timestamp in the key. > > +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.