ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » generate unique id in WMQI

Post new topic  Reply to topic
 generate unique id in WMQI « View previous topic :: View next topic » 
Author Message
kwelch
PostPosted: Thu Jul 31, 2003 11:47 am    Post subject: generate unique id in WMQI Reply with quote

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
View user's profile Send private message Send e-mail
kirani
PostPosted: Thu Jul 31, 2003 12:02 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
kwelch
PostPosted: Thu Jul 31, 2003 12:18 pm    Post subject: Reply with quote

Master

Joined: 16 May 2001
Posts: 255

Thanks Kiran!

Will those functions guarantee uniqueness?

Karen
Back to top
View user's profile Send private message Send e-mail
kirani
PostPosted: Thu Jul 31, 2003 12:20 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
syangloo
PostPosted: Tue Apr 13, 2004 7:21 pm    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger MSN Messenger
jefflowrey
PostPosted: Tue Apr 13, 2004 11:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
syangloo
PostPosted: Wed Apr 14, 2004 12:37 am    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger MSN Messenger
jefflowrey
PostPosted: Wed Apr 14, 2004 2:56 am    Post subject: Reply with quote

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
View user's profile Send private message
syangloo
PostPosted: Wed Apr 14, 2004 2:58 am    Post subject: Reply with quote

Centurion

Joined: 01 Oct 2002
Posts: 120
Location: Kuala Lumpur

OIC....

Thank you very much.

Regards
Syangloo
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » generate unique id in WMQI
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.