Topic
  • 4 replies
  • Latest Post - ‏2019-05-02T16:41:06Z by PaulBrett
paul.brett
paul.brett
860 Posts

Pinned topic Generating a Java style UUID with TX

‏2017-02-07T10:45:33Z |

A client was using a JEXIT() in a TX map to call the Java class to create a UUID, but found that the project would not allow external JARs.

He wanted a UUID generation routine, that would use pure TX.  This is what I came up with.

Let me know if you think this should be improved.

Thank you.

Paul

Follow me on Twitter.

Attachments

  • paul.brett
    paul.brett
    860 Posts

    Re: Generating a Java style UUID with TX

    ‏2017-02-07T10:48:56Z  

    I found this useful quote in the Internet regarding the probability of generating the same UUID twice:

    Only after generating 1 billion UUIDs every second for the next 100 years, the probability of creating just one duplicate would be about 50%. Or, to put it another way, the probability of one duplicate would be about 50% if every person on earth owned 600 million UUIDs.

    Thank you.

    Paul

    Follow me on Twitter.

  • NICK_R
    NICK_R
    25 Posts

    Re: Generating a Java style UUID with TX

    ‏2018-10-09T20:06:34Z  

    I found this useful quote in the Internet regarding the probability of generating the same UUID twice:

    Only after generating 1 billion UUIDs every second for the next 100 years, the probability of creating just one duplicate would be about 50%. Or, to put it another way, the probability of one duplicate would be about 50% if every person on earth owned 600 million UUIDs.

    Thank you.

    Paul

    Follow me on Twitter.

    Hi Paul,

     

    This is so useful as I would not be able to make an External call with the time lines I got to address the UUID issue.

     

    For swift standards now they needs to generate a UUID with same logic you did. But they need 6bd811c8-9618-46bd-8d1f-a883fcf98b75

     

    But they need it as mandatory 4 for the first item of third group and either 8, 9 , a, or b as first item in fourth group.


    Do you think we could still be able to avoid duplicates if we address this map through this mandatory data in these items/ groups.

     

    Secondly, I need to pass this value back to a Different Main map. I have used the RUN function RUN (xxxxxx.mmc) and this will run another source map of yours.. This is giving me no response in that case..

     

    Any help is much appreciated.

     

    Thanks, Nick

  • PaulBrett
    PaulBrett
    367 Posts

    Re: Generating a Java style UUID with TX

    ‏2018-10-15T14:56:35Z  

    Those changes were relatively easy.  I included another map, showing how to call with a RUN() function.

    Thank you.

    Paul

    Follow me on Twitter.

    Attachments

  • NICK_R
    NICK_R
    25 Posts

    Re: Generating a Java style UUID with TX

    ‏2018-10-22T19:11:35Z  
    • PaulBrett
    • ‏2018-10-15T14:56:35Z

    Those changes were relatively easy.  I included another map, showing how to call with a RUN() function.

    Thank you.

    Paul

    Follow me on Twitter.

    THIS IS IT. thank you Paul!!!