Author |
Message
|
kwelch |
Posted: Thu Jul 31, 2003 11:47 am Post subject: generate unique id in WMQI |
|
|
 Master
Joined: 16 May 2001 Posts: 255
|
Hi,
We have the need to generate a unique identifier as part of an xml message. The third party vendor we are sending the xml message to can't read MQMD.Msgid. I was thinking of generating something like QMGR+PutTime which I think has milliseconds. Can anyone think of anything better to use? Thanks.
Karen |
|
Back to top |
|
 |
kirani |
Posted: Thu Jul 31, 2003 12:02 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
You could also use UUIDASBLOB or UUIDASCHAR functions. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
kwelch |
Posted: Thu Jul 31, 2003 12:18 pm Post subject: |
|
|
 Master
Joined: 16 May 2001 Posts: 255
|
Thanks Kiran!
Will those functions guarantee uniqueness?
Karen |
|
Back to top |
|
 |
kirani |
Posted: Thu Jul 31, 2003 12:20 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Yes they do!
That's what IBM says! _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
syangloo |
Posted: Tue Apr 13, 2004 7:21 pm Post subject: |
|
|
Centurion
Joined: 01 Oct 2002 Posts: 120 Location: Kuala Lumpur
|
Hi Kiran,
I know this topic have been closed for long time.
But looking for the same issue at here, If i want to limit the value length to the length i want. Can we do it with this function or do you have any other idea how to creat a unique number with limited length we specify?
Regards
Syangloo |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Apr 13, 2004 11:24 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
syangloo wrote: |
do you have any other idea how to creat a unique number with limited length we specify?
|
You could use UUIDASCHAR and then take the rightmost substring to the length you need.
But the smaller the number, the less unique it will be.
You could select an incrementing id column from a database. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
syangloo |
Posted: Wed Apr 14, 2004 12:37 am Post subject: |
|
|
Centurion
Joined: 01 Oct 2002 Posts: 120 Location: Kuala Lumpur
|
Thanks Jefflowrey,
I try on it.
Other thing is can i know the length for the message id in MQMD?
Know i getting 49 char, it will alway 49 char?
In the MQ Series manual i can get 24byte for msgid.
Just want to double confirm.
Regards
Syangloo |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Apr 14, 2004 2:56 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
syangloo wrote: |
In the MQ Series manual i can get 24byte for msgid. |
That's the length of the message ID. 24 bytes long.
When you represent 24 byte values as hex representations, then you get 48 characters.
But if you want a Unique Message ID, just set the MQOutput node to create a new one. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
syangloo |
Posted: Wed Apr 14, 2004 2:58 am Post subject: |
|
|
Centurion
Joined: 01 Oct 2002 Posts: 120 Location: Kuala Lumpur
|
OIC....
Thank you very much.
Regards
Syangloo |
|
Back to top |
|
 |
|