> the UUID consists of a timestamp part and a machine specific part,

Not necessarily. There are several formats of UUID.

https://en.wikipedia.org/wiki/Universally_unique_identifier#Versions 

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Bernd Oppolzer
Sent: Thursday, October 31, 2019 3:33 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: How can I generate a UUID in a z/OS COBOL Program

The tricky bit here is:

the UUID consists of a timestamp part and a machine specific part,
and, with mainframes, this machine specific part must contain the CPU 
serial number
and the LPAR number. Otherwise the UUIDs will not be unique accross 
different LPARs
on the same machine.

To build UUIDs like this, you need some callable service (I don't recall
the name, maybe CSRSI).

I wrote a C solution to do this in 2007 ca. for a customer of mine;
don't know if I will recall the details. If you want, you can write me
offline mail to discuss this (including the communication with COBOL),

Kind regards

Bernd



Am 31.10.2019 um 22:16 schrieb Charles Mills:
> Are you up for building a C++ program that you could call from COBOL?
>
> https://github.com/graeme-hill/crossguid/blob/master/src/guid.cpp
>
> (Around line 160 there is a bunch of code that is ASCII-specific and not 
> commented as such. Easy to convert, but sloppy IMHO.)
>
> Charles
>
>
> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On 
> Behalf Of Cameron Conacher
> Sent: Thursday, October 31, 2019 12:40 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: How can I generate a UUID in a z/OS COBOL Program
>
> Hello folks,
> I Have done some googling, and I found something called GETITXUID.
>
> I think this might satisfy my needs.
> Has anyone used this? Or know of a more appropriate way to derive a UUID?
>
> Can I just code CALL GETITXUID()?
>
> I just want to be able to generate a UUID from inside a COBOL program
> running in z/OS.
> It might be a CICS/COBOL program or it might be a batch COBOL program, if
> that makes any difference here.
>
> Thanks
>
> ----------------------------------------------------------------------
> 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

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

Reply via email to