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 » MRM:Repeating Complex type Message

Post new topic  Reply to topic
 MRM:Repeating Complex type Message « View previous topic :: View next topic » 
Author Message
Rockon
PostPosted: Tue Dec 07, 2004 3:51 pm    Post subject: MRM:Repeating Complex type Message Reply with quote

Apprentice

Joined: 24 May 2004
Posts: 43

I have defined an MRM Message set using a C structure which has a nested structure and I have to obtain an output which looks like this using an MRM:

Code:
<Student>
 <Subject>
    <Class> </Class>
    <Time> </Time>
    <Day> </Day>
 </Subject>
 <Subject>
    <Class> </Class>
    <Time> </Time>
    <Day> </Day>
 </Subject>
<Subject>
    <Class> </Class>
    <Time> </Time>
    <Day> </Day>
 </Subject>
</Student>


for which i have defined a C structure which looks somethinglike this

Code:
 struct Student{
  struct Subject{
  char Class[20];
  char time[5];
  char Day[7];
};
};


Has anybody been able to use repeating complex type Messages.Any comments or links for any documents on this will be appreciated.
Thankyou
Back to top
View user's profile Send private message
Ramphart
PostPosted: Tue Dec 07, 2004 9:23 pm    Post subject: Reply with quote

Disciple

Joined: 21 Jul 2004
Posts: 150
Location: South Africa, JHB

If I understand your question correctly then this should be easy to achieve.

If you have defined this message in the MRM then you can do something like:

SET "OutputRoot"."MRM"."Subject"[1]."Class" = 'Class1';
SET "OutputRoot"."MRM"."Subject"[1]."Time" = 'Time1';
SET "OutputRoot"."MRM"."Subject"[1]."Day" = 'Day1';

SET "OutputRoot"."MRM"."Subject"[2]."Class" = 'Class2';
SET "OutputRoot"."MRM"."Subject"[2]."Time" = 'Time2';
SET "OutputRoot"."MRM"."Subject"[2]."Day" = 'Day2';

etc. or you can do it in a loop. Your outer tags "<Student>" will automatically be written with the output message.

Basically you reference the repeated structures with an index like [1], [2], etc. Read up on CARDINALITY while you at it to get a better understanding of how this works.
_________________
Applications Architect
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MRM:Repeating Complex type 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.