STCKE is I believe guaranteed unique by architecture. Db2 would fall on its face without that.
Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Farley, Peter x23353 Sent: Friday, March 19, 2021 9:55 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Contents of TOD Programmable Field under z/OS? In reverse order of your questions: Sorry, I am not free to discuss the actual application details. And I did not get that from Peter R.'s statement -- quite the contrary in fact. With the z/OS generated programmable field LPAR value (whatever it may be), the STCKE result is in fact guaranteed unique in a sysplex. Considering that byte 0 of the STCKE result is the epoch index and thus is zero until 2042 and that byte 1 (byte 0 of the TOD clock) changes in far more than one 24 hour period, bytes 2-10 or 11 of the STCKE result combined with byte 15 can comprise quite a reasonably unique value when results only have to be unique for the day. Not guaranteed perhaps, but "good enough". I ran 100 billion loops returning a value constructed from the STCKE result and got no duplicate values. Admittedly this was done with a COBOL driver and a dynamically loaded STCKE subroutine, so it's probable the result location was not in the same cache line as the STCKE, so not as stressful a test as one could possibly construct, but definitely more stressful than the environment in which the real world application lives, so I'm good with that. Peter -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Paul Gilmartin Sent: Friday, March 19, 2021 9:24 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Contents of TOD Programmable Field under z/OS? On Fri, 19 Mar 2021 22:55:25 +0000, Farley, Peter x23353 wrote: <Snipped> >Sounds to me like the first 12 bytes of STCKE plus the last byte of the >"programmable field" in the STCKE result. > Peter R's statement implies that no proper substring of the STCKE value is guaranteed unique. It's surprising that any process requires so many UUIDs that performance is a concern. Must the values be sortable in chronological order? Are you free to disclose the maximum permitted value of your UUIDs? -- 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 ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN