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 » [Solved] Default values overwriting SET statements...

Post new topic  Reply to topic
 [Solved] Default values overwriting SET statements... « View previous topic :: View next topic » 
Author Message
lung
PostPosted: Sun Dec 08, 2002 5:01 pm    Post subject: [Solved] Default values overwriting SET statements... Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

Hi all,

I have encountered a weird problem with WMQI here... Let's just say I have Field1, Field2, and Field3 (ordered this way in the MRM), all with default values of 'ABC'. And I have the following code...
Code:
SET OutputRoot.MRM.Field1 = 'DEF';
SET OutputRoot.MRM.Field3 = 'DEF';
SET OutputRoot.MRM.Field2 = 'DEF';

Notice that I set field2 after field3... The resulting MRM? Field1 and Field3 will be 'DEF' but field2 will be 'ABC'.

However, if...
Code:
SET OutputRoot.MRM.Field1 = 'DEF';
SET OutputRoot.MRM.Field2 = 'DEF';
SET OutputRoot.MRM.Field3 = 'DEF';

Notice that I set everything in order in accordance to the MRM... The resulting MRM? All fields will have 'DEF'.

What gives? I thought we can issue SET statements anywhere in our codes regardless of the order of the fields in the MRM...
_________________
lung
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
kirani
PostPosted: Sun Dec 08, 2002 6:25 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Lung,

This is because of the value set for Type Composition property for the main/parent compound type in your MessageSet, I bet it's set to Ordered Set (default value) in your case. In first case, since you are not setting these fields in the order in which they are defined into Message Set, second field Field2 contains NULL value while writing out the BITSTREAM, this explain why the DEFAULT value is assigned to this field by MRM-Writer.

If you want to write SET statements out-of-order then set your Type Composition to Unordered Set and then you can write your ESQL statements in any order to assign values to MRM-Elements.
_________________
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
lung
PostPosted: Mon Dec 09, 2002 4:41 pm    Post subject: Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

Thanks, Kiran.

If that's the case, then I think I should just set all my compound types to 'Unordered Set'. But is this safe? Can you give me an example where I would use 'Ordered Set'? Frankly speaking, I don't see any applicatoin of 'Ordered Set'...
_________________
lung
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
lung
PostPosted: Mon Dec 09, 2002 5:19 pm    Post subject: Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

Come to think of it... If I set to 'Unordered Set', will my output msg still comes out in order? (field1,field2,field3) Or will it come out in this order? -> field1,field3,field2 ?

This is an MRM-CWF message and not an XML message, so I can't afford to have random order of the fields...
_________________
lung
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
kirani
PostPosted: Mon Dec 09, 2002 6:54 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Hi Lung,
Yes, it is safe to use Unordered Set in your message sets!! Yes, your output will be in order when you use Unorder Set compound types.

I think you will get better performance with Ordered Set as compared with Unordered Set compound types. For Unordered Set compound types, MRM Writer will try it's best to re-order the Message Tree when writing out the message so that the order matches with the message definition.
_________________
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
lung
PostPosted: Tue Dec 10, 2002 4:40 pm    Post subject: Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

Thanks, Kiran! I've tried with 'Unordered Set' and looks like everything is going smoothly and I've yet to see any decline in performance You're a lifesaver!

By the way... How did you put that [Solved] thingy in the message title?
_________________
lung
Back to top
View user's profile Send private message Send e-mail 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 » [Solved] Default values overwriting SET statements...
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.