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



Native I/O should fully support all precisions, despite what limitations
any HLL might have for timestamp support; the I/O buffer would necessarily
be adjusted for the increased precision, and any datum would merely be
passed to the LIC DB to be validated for which there is unlikely to be any
special-case to truncate\round the timestamp values.?

Just try to fill a timestamp variable with 12 microseconds with the RPG
built-in-Function %Timestamp() or Display DSPLY %Timestamp(*SYS: 12).
After fill the same variable with the SQL special register.
I'm quite sure in the first case the result looks like:
YYYY-MM-DD-HH-MI-SS.XXX000000000000 and in the second case all digits are
filled.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im Auftrag von CRPence
Gesendet: Thursday, 16.7 2015 16:58
An: rpg400-l@xxxxxxxxxxxx
Betreff: Re: duplicate key error in identity column

On 15-Jul-2015 23:06 -0600, Birgitta Hauser wrote:
Dan on Wednesday, 15.7 2015 20:51 wrote:
[...] v7r2 has an enhancement to the timestamp that allows 12 digits
to be defined for the "microsecond" [...]

As an aside:
Timestamps with up to 12 digits can only be managed in SQL described
tables, views or indexes, but cannot be defined within DDS described
physical or logical files ... but all 12 digits for the micro seconds
are only filled when using the SQL Special Register
Current_Timestamp(12).

I suspect "only" approaches hyperbole or is at least misleading; e.g.
the CAST scalar supports TIMESTAMP(p) syntax.?


When performing the write or update with native I/O as before only the
first 3 digits are filled


Presumably for when using a HLL timestamp host variable or HLL BIF\OpCode
to assign the value; i.e. the implication being that the HLLs may not have
added any support for additional precision with their HLL timestamp data
type, instead adding support only for what was minimally necessary for RLA
[Row-Level Access, aka native I/O]? Native I/O should fully support all
precisions, despite what limitations any HLL might have for timestamp
support; the I/O buffer would necessarily be adjusted for the increased
precision, and any datum would merely be passed to the LIC DB to be
validated for which there is unlikely to be any special-case to
truncate\round the timestamp values.? If an HLL would allow
open\read\update a file with the larger precision, surely the timestamp data
does not surreptitiously lose precision; that surely would be a defect?

--
Regards, Chuck

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (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 thread ...

Follow-Ups:
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.