×
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.
I lost the chain where Booth, I think, was looking at some aspects of
the timestamp functions on the system. I responded that fractional
seconds are easily obtained using the "current timestamp" special SQL
register - so I thought I'd better test things. Bruce had already done
some of this, I hope this isn't superfluous.
No matter what I did, the %timestamp BIF resolves only to milliseconds.
In the example below, they are all equal - because it ran so quickly.
The SQL approach resolves to as many fractional seconds as the target
variable allows. This is what I would use if I needed the finest
granularity, for uniqueness, I believe.
I didn't test the QWCCVTDT API, which, however, is limited to
microseconds = 6 fractional seconds, as Bruce pointed out. The
additional uniqueness digits, IIRC, are available using an MI function,
MATTOD - it's been awhile since playing with this, so I might have it
slightly off.
// Use *SYS in BIF
tstmp06sys = %timestamp(*sys : 6);
tstmp12sys = %timestamp(*sys : 12);
// Use SQL current timestamp
exec sql
set :tstmp06s = current timestamp;
exec sql
set :tstmp12s = current timestamp(12);
exec sql
set :tstmp06sfrom12 = current timestamp(12);
exec sql
set :tstmp12sfrom06 = current timestamp;
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.