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



GENERATE_UNIQUE looks very interesting - its doc says it uses internal timestamp and system serial number - I suspect the MATTOD MI is used - this is guaranteed to be unique. GENERATE_UNIQUE is intended to replace the TIMESTAMP() function, which is NOT guaranteed to be unique, even down to the microsecond - our machines are just too fast. But MATTOD reserves some bits for uniqueness.

Vern

----- Original Message -----
Not sure if the MI function UUID is used, but if you are looking for a
uniquely generated value, you may try the GENERATE_UNIQUE scalar function.
http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Fdb2%2Frb
afzscagenerateunique.htm


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: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Vengoal Chang
Gesendet: Monday, 01.7 2013 09:05
An: Midrange Systems Technical Discussion
Betreff: A SQL UDF GENSYSUUID in DB2 SQL

DB2 does not natively support UUID, but OS400 does. So here I provide a
sample UDF implementation of UUID based on RPGLE.

For your reference:
http://code.midrange.com/8767d64b98.html

http://blog.xuite.net/vengoal/as400/79759985

--
Best Regards,

Vengoal Chang
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-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.