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 » duplicate elements in compound message

Post new topic  Reply to topic
 duplicate elements in compound message « View previous topic :: View next topic » 
Author Message
vennela
PostPosted: Tue Nov 16, 2004 8:33 am    Post subject: duplicate elements in compound message Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Posting this on behalf of somebody.

I have a doubt regarding usage of a message set.

I have a message set and created some elements like A,B,C.
I created a compound message type with Type composition'sequence' and Typecontent 'closed'.
this was done to duplicate elements.
In the Compound message type , i have A,B,C,A .
Now in the esql code , i want to assign different values for A like

set A= 10
set B =5
set C=13
set A=20

My problem is The first set A=10 is being replaced by the last set A.

Is there any way in which i can preserve the structure of the message with different values?

I checked in the esql reference manual(chap 5 , page 115 ) for type composition sequence . it said that
the first set assigns first element and second set to second.is this related to the above problem?.IF so it should not replace the first item right?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jefflowrey
PostPosted: Tue Nov 16, 2004 8:36 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The first occurance of an element named A will be addressed by the syntax A[1].

The second will be addressed by A[2].
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Pavan
PostPosted: Tue Nov 16, 2004 10:49 am    Post subject: Reply with quote

Newbie

Joined: 16 Oct 2004
Posts: 3

Can this syntax also be used for duplicate elements ?
As it is given that this syntax is for repeating elements.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Nov 16, 2004 10:54 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Pavan wrote:
Can this syntax also be used for duplicate elements ?
As it is given that this syntax is for repeating elements.


Please explain to me the difference between one type of element that occurs more than once and the other type of element that occurs more than once.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Pavan
PostPosted: Tue Nov 16, 2004 11:13 am    Post subject: Reply with quote

Newbie

Joined: 16 Oct 2004
Posts: 3

Referring the manual , ""Repeated elements are always contiguous and are specified in the form A[n]. ""

where as duplicate elements need not be contiguous.


Is the syntax same for specifying the non-contigous elements?
Back to top
View user's profile Send private message
kirani
PostPosted: Tue Nov 16, 2004 11:18 am    Post subject: Reply with quote

Jedi Knight

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

Repeated Elements: A repeated element is an element that is included once within the compound type, and is defined with the property Repeat set to Yes (on the Connection pane). Repeated elements are therefore always contiguous and are always specified in the form A[n].

Duplicate Elements: A duplicate element is an element included more than once anywhere within the compound type. Duplicate elements do not have to be contiguous.
_________________
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
Pavan
PostPosted: Tue Nov 16, 2004 11:41 am    Post subject: Reply with quote

Newbie

Joined: 16 Oct 2004
Posts: 3

So how can the non-contiguous elements that are duplicated in a compound type be specified different values?
Back to top
View user's profile Send private message
kirani
PostPosted: Tue Nov 16, 2004 11:59 am    Post subject: Reply with quote

Jedi Knight

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

You will still use ArrayIndex type reference to refer to these duplicate elements (as explained by Jeff). For example, OutputRoot.MRM.A[1] will refer to first element, and OutputRoot.MRM.A[2] will refer to second element and so on ..

BTW this is all documented in Working With Messages manual.
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » duplicate elements in compound message
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.