Re: How can I generate a UUID in a z/OS COBOL Program
David Crayford wrote: >It can be a hard sell to convince management to introduce new >languages/runtimes into production environments which will >need to be supported. OK, but this one (Java in CICS) celebrated its 23rd birthday earlier this year. According to Tiobe, Java is the world's most popular programming language. According to the same source, Java has alternated between #1 and #2 (mostly the former) for a quarter century. When do you plan to get around to having this (hopefully short) discussion? I'm not joking. Timothy Sipples IT Architect Executive, Industry Solutions, IBM Z & LinuxONE E-Mail: sipp...@sg.ibm.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I generate a UUID in a z/OS COBOL Program
Agreed. But, not only to add, but to remove, as well. -Original Message- From: IBM Mainframe Discussion List On Behalf Of David Crayford Sent: Friday, November 15, 2019 7:31 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: How can I generate a UUID in a z/OS COBOL Program On 2019-11-15 4:57 PM, Timothy Sipples wrote: >> In any case I don't think adding Java to our environment, where Java >> is not currently be using by "user applications", is a good way to >> go. > Why on earth not? It can be a hard sell to convince management to introduce new languages/runtimes into production environments which will need to be supported. I can relate to your sentiments but that's just how it is at a lot of sites. -- 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
Re: How can I generate a UUID in a z/OS COBOL Program
On 2019-11-15 4:57 PM, Timothy Sipples wrote: In any case I don't think adding Java to our environment, where Java is not currently be using by "user applications", is a good way to go. Why on earth not? It can be a hard sell to convince management to introduce new languages/runtimes into production environments which will need to be supported. I can relate to your sentiments but that's just how it is at a lot of sites. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I generate a UUID in a z/OS COBOL Program
Frank Swarbrick wrote: >In my case the requirement for a UUID is from a CICS program. >It is my understanding that OO COBOL is not supported under CICS. OK. >Can Java applications be called by CICS programs using EXEC CICS >LINK? Yes, of course. It can be a Java Standard Edition (JSE) program running in a CICS JVM, or it can be a (notionally in this case) Java Enterprise Edition (JEE) program running in CICS Liberty, as you prefer. >In any case I don't think adding Java to our environment, where >Java is not currently be using by "user applications", is a good >way to go. Why on earth not? Timothy Sipples IT Architect Executive, Industry Solutions, IBM Z & LinuxONE E-Mail: sipp...@sg.ibm.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I generate a UUID in a z/OS COBOL Program
In my case the requirement for a UUID is from a CICS program. It is my understanding that OO COBOL is not supported under CICS. Can Java applications be called by CICS programs using EXEC CICS LINK? In any case I don't think adding Java to our environment, where Java is not currently be using by "user applications", is a good way to go. Our requirement for the UUID is not immediate, so I don't see any reason to not wait for COBOL built in support; assuming UUID Version 4 is supported. Frank From: IBM Mainframe Discussion List on behalf of Timothy Sipples Sent: Thursday, November 14, 2019 12:15 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: How can I generate a UUID in a z/OS COBOL Program Frank Swarbrick wrote: >The SWIFT payments network has a field called the UETR >(Unique End-to-end Transaction Reference), which is a >Version 4 UUID. Will the new Enterprise COBOL feature >be able to generate a Version 4 UUID? You can already generate version 4 UUIDs via INVOKE to a small -- really, really small -- bit of Java code. Here's a basic Java sample to generate a version 4 UUID: import java.util.UUID; class UUIDSample { public static void main(String arg[]) throws UnsupportedOperationException { UUID v4uuid = UUID.randomUUID(); // Then do what you want with v4uuid here // (Return it, for example) } } SWIFT may or may not need something more than a IETF RFC 4122 version 4 UUID. This approach works with all z/OS and Enterprise COBOL releases that are still in service, plus some past releases that have reached End of Service. java.util.UUID was introduced all the way back in Java 5, for example. (The Java 5 SDK for z/OS was released on December 16, 2005, and reached End of Service on September 30, 2013.) I can't remember when INVOKE was first introduced, but it was a long time ago. Moreover, if you're concerned about entropy, my understanding with this code sample is that it'll automatically benefit from the True Random Number Generator (TRNG) included in the IBM z14 and later processors, just as long as your Java Runtime Environment is recent enough (which is not particularly recent at this point) to be aware of the TRNGs. On earlier models you could presumably ask Crypto Express to provide a TRN to the JRE, with a few more Java Cryptography Extension (JCE)-related lines of code I imagine. In short, while UUID (including UUID version 5) functions in Enterprise COBOL and/or Language Environment would be most welcome in my view, you don't have to wait, and you shouldn't wait. Solve the problem you have, and it's very easy to solve, right now. If somebody wants to raise an objection such as "Oh, I can't do that -- that's another language," then my basic response is "Don't be silly." JCL, DL/I, and SQL are also languages that aren't COBOL, and so what? A COBOL programmer would hardly be a competent one without knowing a little bit about some other languages, enough to be useful and productive anyway. Two of those three aren't included in the base z/OS operating system, as it happens, but Java is. Did the English language wait to arrive at some consensus alternative instantiations of the words sushi, taxi, and detente, as examples? INVOKE is there for a reason (and has been for well over a decade), so use it! Timothy Sipples IT Architect Executive, Industry Solutions, IBM Z & LinuxONE E-Mail: sipp...@sg.ibm.com -- 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
Re: How can I generate a UUID in a z/OS COBOL Program
You can see the Java code implementation here https://github.com/openjdk-mirror/jdk7u-jdk/blob/master/src/share/classes/java/util/UUID.java. On 2019-11-14 3:15 PM, Timothy Sipples wrote: Frank Swarbrick wrote: The SWIFT payments network has a field called the UETR (Unique End-to-end Transaction Reference), which is a Version 4 UUID. Will the new Enterprise COBOL feature be able to generate a Version 4 UUID? You can already generate version 4 UUIDs via INVOKE to a small -- really, really small -- bit of Java code. Here's a basic Java sample to generate a version 4 UUID: import java.util.UUID; class UUIDSample { public static void main(String arg[]) throws UnsupportedOperationException { UUID v4uuid = UUID.randomUUID(); // Then do what you want with v4uuid here // (Return it, for example) } } SWIFT may or may not need something more than a IETF RFC 4122 version 4 UUID. This approach works with all z/OS and Enterprise COBOL releases that are still in service, plus some past releases that have reached End of Service. java.util.UUID was introduced all the way back in Java 5, for example. (The Java 5 SDK for z/OS was released on December 16, 2005, and reached End of Service on September 30, 2013.) I can't remember when INVOKE was first introduced, but it was a long time ago. Moreover, if you're concerned about entropy, my understanding with this code sample is that it'll automatically benefit from the True Random Number Generator (TRNG) included in the IBM z14 and later processors, just as long as your Java Runtime Environment is recent enough (which is not particularly recent at this point) to be aware of the TRNGs. On earlier models you could presumably ask Crypto Express to provide a TRN to the JRE, with a few more Java Cryptography Extension (JCE)-related lines of code I imagine. In short, while UUID (including UUID version 5) functions in Enterprise COBOL and/or Language Environment would be most welcome in my view, you don't have to wait, and you shouldn't wait. Solve the problem you have, and it's very easy to solve, right now. If somebody wants to raise an objection such as "Oh, I can't do that -- that's another language," then my basic response is "Don't be silly." JCL, DL/I, and SQL are also languages that aren't COBOL, and so what? A COBOL programmer would hardly be a competent one without knowing a little bit about some other languages, enough to be useful and productive anyway. Two of those three aren't included in the base z/OS operating system, as it happens, but Java is. Did the English language wait to arrive at some consensus alternative instantiations of the words sushi, taxi, and detente, as examples? INVOKE is there for a reason (and has been for well over a decade), so use it! Timothy Sipples IT Architect Executive, Industry Solutions, IBM Z & LinuxONE E-Mail: sipp...@sg.ibm.com -- 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
Re: How can I generate a UUID in a z/OS COBOL Program
Frank Swarbrick wrote: >The SWIFT payments network has a field called the UETR >(Unique End-to-end Transaction Reference), which is a >Version 4 UUID. Will the new Enterprise COBOL feature >be able to generate a Version 4 UUID? You can already generate version 4 UUIDs via INVOKE to a small -- really, really small -- bit of Java code. Here's a basic Java sample to generate a version 4 UUID: import java.util.UUID; class UUIDSample { public static void main(String arg[]) throws UnsupportedOperationException { UUID v4uuid = UUID.randomUUID(); // Then do what you want with v4uuid here // (Return it, for example) } } SWIFT may or may not need something more than a IETF RFC 4122 version 4 UUID. This approach works with all z/OS and Enterprise COBOL releases that are still in service, plus some past releases that have reached End of Service. java.util.UUID was introduced all the way back in Java 5, for example. (The Java 5 SDK for z/OS was released on December 16, 2005, and reached End of Service on September 30, 2013.) I can't remember when INVOKE was first introduced, but it was a long time ago. Moreover, if you're concerned about entropy, my understanding with this code sample is that it'll automatically benefit from the True Random Number Generator (TRNG) included in the IBM z14 and later processors, just as long as your Java Runtime Environment is recent enough (which is not particularly recent at this point) to be aware of the TRNGs. On earlier models you could presumably ask Crypto Express to provide a TRN to the JRE, with a few more Java Cryptography Extension (JCE)-related lines of code I imagine. In short, while UUID (including UUID version 5) functions in Enterprise COBOL and/or Language Environment would be most welcome in my view, you don't have to wait, and you shouldn't wait. Solve the problem you have, and it's very easy to solve, right now. If somebody wants to raise an objection such as "Oh, I can't do that -- that's another language," then my basic response is "Don't be silly." JCL, DL/I, and SQL are also languages that aren't COBOL, and so what? A COBOL programmer would hardly be a competent one without knowing a little bit about some other languages, enough to be useful and productive anyway. Two of those three aren't included in the base z/OS operating system, as it happens, but Java is. Did the English language wait to arrive at some consensus alternative instantiations of the words sushi, taxi, and detente, as examples? INVOKE is there for a reason (and has been for well over a decade), so use it! Timothy Sipples IT Architect Executive, Industry Solutions, IBM Z & LinuxONE E-Mail: sipp...@sg.ibm.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I generate a UUID in a z/OS COBOL Program
It looks like the Enterprise PL/I UID BIF only generates a Version 5 UUID. The SWIFT payments network has a field called the UETR (Unique End-to-end Transaction Reference), which is a Version 4 UUID. Will the new Enterprise COBOL feature be able to generate a Version 4 UUID? Here's the reference page I used. I looked on swift.com and wasn't able to find the specific requirement, but I didn't search too hard. https://www.sepaforcorporates.com/swift-for-corporates/explained-swift-gpi-uetr-unique-end-to-end-transaction-reference/ [https://www.sepaforcorporates.com/wp-content/uploads/2018/10/uetr-swift-gpi-cross-border-payments.jpg]<https://www.sepaforcorporates.com/swift-for-corporates/explained-swift-gpi-uetr-unique-end-to-end-transaction-reference/> Explained: SWIFT gpi UETR - Unique End-to-End Transaction Reference<https://www.sepaforcorporates.com/swift-for-corporates/explained-swift-gpi-uetr-unique-end-to-end-transaction-reference/> Before we delve into the UETR, we need to know what the SWIFT gpi is. In a nutshell SWIFT gpi refers to SWIFT’s Global Payments Innovation initiative, enabling: Faster payments – enabling same day use of funds Transparency of fees End to end visibility/tracking of payments Complete and unaltered ... www.sepaforcorporates.com From: IBM Mainframe Discussion List on behalf of Allan Kielstra Sent: Friday, November 1, 2019 2:14 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: How can I generate a UUID in a z/OS COBOL Program We're actually working on generating UUID directly from COBOL. I would expect to see it in V6.2 and V6.3 in a continuous delivery PTF fairly soon. We'll post more information when it does become available. -- 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
Re: How can I generate a UUID in a z/OS COBOL Program
Tom, That is a good thing to have available in COBOL but as others have already said, wouldn't this be better implemented as an LE callable function available to other HLL's besides COBOL (including Assembler)? Or is it the intention of the IBM COBOL Development team to implement the COBOL intrinsic function as an invocation of a new underlying callable LE function? Peter -Original Message- From: IBM Mainframe Discussion List On Behalf Of Tom Ross Sent: Friday, November 8, 2019 1:30 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: How can I generate a UUID in a z/OS COBOL Program We (IBM COBOL development) have accepted an RFE to add this capability of genrating a UUID via a new Intrinsic Function, it should be available early next year. Cheers, TomR >> COBOL is the Language of the Future! << -- 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
Re: How can I generate a UUID in a z/OS COBOL Program
We (IBM COBOL development) have accepted an RFE to add this capability of genrating a UUID via a new Intrinsic Function, it should be available early next year. Cheers, TomR >> COBOL is the Language of the Future! << -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I generate a UUID in a z/OS COBOL Program
To net it out, thanks again to Walmart (and to the specific authors at Walmart) for creating and sharing this code. Bravo. Timothy Sipples IT Architect Executive, Industry Solutions, IBM Z & LinuxONE E-Mail: sipp...@sg.ibm.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I generate a UUID in a z/OS COBOL Program
I used to be on one of the IBM Invention Development Teams and the rules on patents changed a few years ago. Prior to the change, the protection date was date of invention. After the change, it became the patent filling date. If you publish anything about the patent you intend to file, anyone can take your info and file a patent on it then you are screwed. The publish process you describe defines prior art and is to protect the invention against another company inventing it in parallel and applying for a patent. There are many inventions which do not meet the requirements of the cost of the patent but should be protected. Clear as mud? Jim On Mon, Nov 4, 2019, 11:02 AM Tony Harminc wrote: > On Sun, 3 Nov 2019 at 20:31, Timothy Sipples wrote: > > > Matt Hogstrom wrote: > > >https://github.com/walmartlabs/zUID > > >Courtesy of Walmart > > > > Tony Harminc wrote: > > >Wouldn't want to bump into that pending patent from Walmart... > > > > Walmart licensed the code they're sharing under the Apache License 2.0: > [...] > > I commend Walmart for doing this. > > Indeed. I wish IBM would do a bit more of it, rather than crowing over > the ever increasing number of patents they hold that are not so > licensed. > > > Without filing for a patent, somebody else (who might be much less > generous) could grab it. > > Well, no. The easier and cheaper thing to do would be to publish the > potentially patentable information as early as possible. This makes > the knowledge available, while forestalling anyone else's attempt to > patent it. IBM used to have an entire print journal for just this > purpose. [IBM, and doubtless others, have also exploited the nifty > trick of publishing in the most obscure (preferably foreign language) > journal that the US patent office will recognize as counting toward > publication. Then when someone else independently invents and tries to > patent, out comes the journal article to shut it down. But that's > another story.] > > Tony H. > > -- > 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
Re: How can I generate a UUID in a z/OS COBOL Program
On Sun, 3 Nov 2019 at 20:31, Timothy Sipples wrote: > Matt Hogstrom wrote: > >https://github.com/walmartlabs/zUID > >Courtesy of Walmart > > Tony Harminc wrote: > >Wouldn't want to bump into that pending patent from Walmart... > > Walmart licensed the code they're sharing under the Apache License 2.0: [...] > I commend Walmart for doing this. Indeed. I wish IBM would do a bit more of it, rather than crowing over the ever increasing number of patents they hold that are not so licensed. > Without filing for a patent, somebody else (who might be much less generous) > could grab it. Well, no. The easier and cheaper thing to do would be to publish the potentially patentable information as early as possible. This makes the knowledge available, while forestalling anyone else's attempt to patent it. IBM used to have an entire print journal for just this purpose. [IBM, and doubtless others, have also exploited the nifty trick of publishing in the most obscure (preferably foreign language) journal that the US patent office will recognize as counting toward publication. Then when someone else independently invents and tries to patent, out comes the journal article to shut it down. But that's another story.] Tony H. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I generate a UUID in a z/OS COBOL Program
Matt Hogstrom wrote: >https://github.com/walmartlabs/zUID >Courtesy of Walmart Tony Harminc wrote: >Wouldn't want to bump into that pending patent >from Walmart... Walmart licensed the code they're sharing under the Apache License 2.0: https://github.com/walmartlabs/zUID/blob/master/LICENSE Quoting Wikipedia: "The Apache License 2.0 makes sure that the user does not have to worry about infringing any patents by using the software. The user is granted a license to any patent that covers the software. This license is terminated if the user sues anyone over patent infringement related to this software. This condition is added in order to prevent patent litigations." I commend Walmart for doing this. Without filing for a patent, somebody else (who might be much less generous) could grab it. In addition to the suggestions already offered, you could INVOKE your favorite Java UUID generator method from COBOL. Java itself (since Java 1.5) includes a java.util.UUID class which can generate most variants and versions of RFC 4122 UUIDs, but unfortunately not the popular variant 2 version 5. There are many version 5 code samples available, including here (tutorial with a further link to a MIT Licensed code sample): https://www.baeldung.com/java-uuid By the way, in case anybody is wondering, there's a reference to UUIDs in the z/OS Communications Server documentation here: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.4.0/com.ibm.zos.v2r4.halx001/nscsuu.htm However, based on some other reading, presumably UUID@GEN only supports the circa 1988 Apollo Network Computing System (NCS) UUID format, which barely carried forward into IETF RFC 4122 as variant 0. If you've got something using this program, OK, but I wouldn't use it for new code. I should reference Peter Dennler (alias Don Krawacki) at Credit Suisse for sharing some UUID-related work. Here are some links (German language mainly): http://www.krawacki.ch/pdf/UUID_ETOD_V22d.pdf http://www.krawacki.ch/samples_ass/YYUUID.txt http://www.krawacki.ch/pdf/Time_V21.pdf Timothy Sipples IT Architect Executive, Industry Solutions, IBM Z & LinuxONE E-Mail: sipp...@sg.ibm.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I generate a UUID in a z/OS COBOL Program
Yes, a service available also to C/C++ programs would be very nice. Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Frank Swarbrick Sent: Friday, November 1, 2019 1:47 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: How can I generate a UUID in a z/OS COBOL Program Most excellent! New Fed Wire rules will require a UUID for an upcoming version, so this is very good news. I do kind of question the need for language specific methods, though. Couldn't an LE service be developed for use by all languages? Either way, I look forward to it. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I generate a UUID in a z/OS COBOL Program
On Fri, 1 Nov 2019 at 16:15, Allan Kielstra wrote: > > We're actually working on generating UUID directly from COBOL. I would > expect to see it in V6.2 and V6.3 in a continuous > delivery PTF fairly soon. We'll post more information when it does become > available. Wouldn't want to bump into that pending patent from Walmart... Tony H. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I generate a UUID in a z/OS COBOL Program
Most excellent! New Fed Wire rules will require a UUID for an upcoming version, so this is very good news. I do kind of question the need for language specific methods, though. Couldn't an LE service be developed for use by all languages? Either way, I look forward to it. From: IBM Mainframe Discussion List on behalf of Allan Kielstra Sent: Friday, November 1, 2019 2:14 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: How can I generate a UUID in a z/OS COBOL Program We're actually working on generating UUID directly from COBOL. I would expect to see it in V6.2 and V6.3 in a continuous delivery PTF fairly soon. We'll post more information when it does become available. -- 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
Re: How can I generate a UUID in a z/OS COBOL Program
We're actually working on generating UUID directly from COBOL. I would expect to see it in V6.2 and V6.3 in a continuous delivery PTF fairly soon. We'll post more information when it does become available. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: How can I generate a UUID in a z/OS COBOL Program
https://github.com/walmartlabs/zUID Courtesy of Walmart Matt Hogstrom +1 (919) 656-0564 > On Oct 31, 2019, at 18:51, Charles Mills wrote: > > There is a PL/I function to do this. > > https://www.ibm.com/support/knowledgecenter/en/SSY2V3_5.1.0/com.ibm.ent.pl1.zos.doc/lr/lsh_uuid.html > > > I am not familiar with how to call a PL/I BIF from COBOL (or call a PL/I > program that in turn calls a BIF) but perhaps others on this forum are. > > 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
Re: How can I generate a UUID in a z/OS COBOL Program
There is a PL/I function to do this. https://www.ibm.com/support/knowledgecenter/en/SSY2V3_5.1.0/com.ibm.ent.pl1.zos.doc/lr/lsh_uuid.html I am not familiar with how to call a PL/I BIF from COBOL (or call a PL/I program that in turn calls a BIF) but perhaps others on this forum are. 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
Re: How can I generate a UUID in a z/OS COBOL Program
> 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
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
Re: How can I generate a UUID in a z/OS COBOL Program
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
Re: How can I generate a UUID in a z/OS COBOL Program
It seems to be part of "Transformation Extender." Do you have that product? I see a SQL function GENERATE_UUID() but it looks like Db2 for z/OS does not implement. Does anyone know of a C or UNIX library function to do this? 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. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN