Thanks for the reference.  I see from the DB2 documentation that:

The GENERATE_UNIQUE function returns a bit data character string that is 
unique, compared to any other execution of the same function.

GENERATE_UNIQUE()

The schema is SYSIBM.

The GENERATE_UNIQUE function returns a bit data character string 13 bytes long 
(CHAR(13) FOR BIT DATA) that is unique compared to any other execution of the 
same function. The function is defined as not deterministic. Although the 
function has no arguments, the empty parentheses must be specified when the 
function is invoked.
The result of the function is a unique value that includes the internal form of 
the Universal Time, Coordinated (UTC) and, if in a sysplex environment, the 
sysplex member where the function was processed.
The result cannot be null.
The result of this function can be used to provide unique values in a table. 
The sequence is based on the time when the function was executed.

Sounds to me like the first 12 bytes of STCKE plus the last byte of the 
"programmable field" in the STCKE result.

That looks like lots of overhead to connect to and call a DB2 function when a 
simple STCKE gets you the same information.

The application program at issue is not already using DB2, so this one is not 
in the running on a performance basis alone.

If the program needing the value was already using DB2, maybe not so bad,  but 
in my case it is not already accessing DB2.

Peter

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Salva Carrasco
Sent: Friday, March 19, 2021 2:25 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Contents of TOD Programmable Field under z/OS?

Peter, GENERATE UNIQUE Db2 function, warrants the uniqueness aceoss a Sysplex 
and it is based on TODE.
--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to