PL/I

PL/I

PL/I

 View Only
  • 1.  Name ID used to create UUID string.

    Posted Sun July 02, 2017 08:29 AM

    Version 5.1 has added a UUID function; which returns a 36-character UUID value

    presumably created from the version 5 uuid_t described in RFC 4122, with the

    information (the "name") described in the PL/I documentation.

     

    RFC 4122 indicates that a unique "name identifier" be used to create the SHA1

    hash (along with the given name information) but the IBM documentation does

    not describe that "name identifier".

     

    Can that be detailed?

     

      - Many thanks -

      - Dave Rivers -

     

     

    tdr


  • 2.  Re: Name ID used to create UUID string.

    Posted Sun July 02, 2017 09:12 AM

    Hmm - replying to myself - but OK.

     

    Also - I note in RFC 1422 regarding version 5 UUIDs, it says:

     

    The requirements for these types of UUIDs are as follows:   o  The UUIDs generated at different times from the same name in the      same namespace MUST be equal.

     

    I believe including the time-stamp (the STCK value? - the documentation isn't clear)

    completely defeats that requirement.   If I'm understanding things correctly, a version 5

    UUID is intended to be unique, but easily regenerated; so that an invocation of the UUID

    builtin on the same machine (certainly multiple times within the same PL/I program)

    should return the same value and not be time-dependent.  I believe by muddying

    the "name" with a STCK value that behavior has been lost.

     

    Would it be better to remove the STCK value from the "name"?

     

    Version 1 UUIDs are time-dependent.

    tdr


  • 3.  Re: Name ID used to create UUID string.

    Posted Fri February 02, 2018 12:47 PM

    Correct, if you need a user supplied "namespace" as argument to uuid, it would need an enhancement. The current implementation only address the uniqueness issue with the use of time dependent value.

    ccw


  • 4.  Re: Name ID used to create UUID string.

    Posted Tue February 06, 2018 11:07 AM

    Well - it's not that we need a user-supplied namespace; more that using the time-value

    breaks the version 5 standard that requires the same UUID be returned on the same machine.

    Incorporating the current time value in the uuid-string generation breaks that.

     

    Also - the documentation does not provide the "name identifier" used to create the UUID.

    tdr


  • 5.  Re: Name ID used to create UUID string.

    Posted Wed February 07, 2018 01:28 PM

    In the 5.2 LRM, we updated the description of the UUID function with this additional text

     

    The name-space information consists of:
    1. System information:
    v CPU count
    v MVS name
    v storage size
    v model and serial
    2. Runtime 64 bit TOD value.
    3. Job name or, if possible, the PID.
    The UUID is a SHA1 hash of the above.

    pelderon


  • 6.  Re: Name ID used to create UUID string.

    Posted Wed February 07, 2018 01:39 PM

    Hi Peter!

     

     Thanks for the pointer...  however, the doc says that UUID returns a version 5 UUID.

     

     But, doesn't including the time-of-day value in the name-space break the version 5 requirement

    of returning the same UUID?   I suppose not, if the time-stamp is put into the name-space (technically,

    then, each invocation of UUID is using a different name-space I suppose.)  Just curious... 

    tdr


  • 7.  Re: Name ID used to create UUID string.

    Posted Wed February 07, 2018 01:48 PM

    Also - let me add that a version 5 UUID is a "name" created within a "namespace"; those are 2 separate

    ideas...

     

    I'm guessing that the doc is describing the "name" that is used.

     

    But - there is no description of the "namespace" in which that name resides.

     

    For example, if you were going to do use the fully-qualified domain name to create a UUID, that

    name is from the "DNS" namespace, which is defined as "6ba7b810-9dad-11d1-80b4-00c04fd430c8".

     

    Is there any plan to define/describe the namespace the UUID builtin is using, so that it doesn't

    possibly conflict with another namespace?

     

    Or - is the documentation actually describing the namespace that is used, but not describing the name?

     

    I think there are two items that go into a version 5 UUID, and I'm kinda only seeing one - maybe?? 

     

    tdr