|
A lot of different terms are used, it seems, for the same things. So I'm
wondering about "system timestamp". Are these the same thing?
1. TOD value returned by the MATTOD MI function
2. System clock as discussed in documentation for CVTD MI function
3. *DTS as discussed in documentation for QWCCVTDT API
So far as I can tell, TOD and *DTS are the same, since the range of
dates is the same - back to somewhere in 1928 and up through somewhere
in 2071
Thanks
Vern
Paul Jackson wrote:
On Fri, Feb 19, 2010 at 5:22 PM, Simon Coulter <shc@xxxxxxxxxxxxxxxxx>wrote:
--
On 20/02/2010, at 10:47 AM, Paul Jackson wrote:
What is the current recommended method of converting a "systemThat's the easiest method but is likely slower than the MI version.
timestamp" date (8 bytes) into a regular RPG native timestamp field?
I've seen a bunch of date and time API's/MI instructions out there so
was curious as to the best method to use. I will be doing this
conversion many hundreds of thousands of times and so would be looking
for the quickest method (assuming there is a big difference between
them).
I've used QWCCVTDT before, should I just stick with that?
You would be trading ease for speed. The only way to know for sure is
to perform empirical tests but I suspect the call overhead to the API
will be measurable over "many hundreds of thousands" of iterations.
If you use the MI built-in _CVTD then you'll need to build appropriate
DDAT structures for the input and output dates. Not difficult but lots
of sub-fields to set and offsets to calculate correctly.
Search the archives for additional information on DDAT structures.
Thanks Simon, I will search further.
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
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.