Page 1 of 1

Generate the UUID using COBOL.

Posted: Tue Aug 30, 2016 5:38 pm
by DigSin
Hi,

For one of the requirement, I needed to generate the UUID (Universal Unique Identifier) based on the standard listed on this link: https://www.ietf.org/rfc/rfc4122.txt - using version 4 of the generation algorithm.

This needs to be done in Mainframe cobol module. I tried to search for generic cobol/db2 functions which can be used for this, but couldn't find any. Is any one of you aware of any such cobol function?

We are thinking to create our own module to do this using the GENERATE_UNIQUE function of DB2, but that will be also need unnecessary work to convert it into UUID format. I would believe that IBM mostly provides such utility in Cobol/Assmbler/DB2 as such functions are readily available in Java and this is an International standard.

Thanks in advance for any help :-)

Re: Generate the UUID using COBOL.

Posted: Tue Aug 30, 2016 6:27 pm
by Robert Sample
Have you looked in the Communications Server bookshelf? I Googled z/os uuid and got back about 145,000 hits and the first was titled Running UUID@GEN and linked to (edited for spacing):
Running UUID@GEN

z/OS Communications Server: IP Programmer's Guide and Reference
SC27-3659-02
The NCS program UUID@GEN generates universal unique identifiers. The UUID@GEN data set is a member of SEZALOAD.

For more information about using UUID@GEN, see NCS for IBM® AIX/ESA® Planning and Administration Guide.

Use the following format to invoke the UUID@GEN.
Read syntax diagramSkip visual syntax diagram
>>-UUID@GEN----------------------------------------------------><
You'll need to talk to your site support group about locating the SEZALOAD library and you'll need to read the manual on how to call UUID@GEN.
I would believe that IBM mostly provides such utility in Cobol/Assmbler/DB2
What you believe and what reality is, are two VERY DIFFERENT things. Some tools IBM only makes available in C, and some international standards IBM doesn't support at all on z/OS due to architectural differences. In fact, COBOL and DB2 are extra-cost software, not part of z/OS base, and hence not every site has COBOL and / or DB2.