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 Mapping Question

Post new topic  Reply to topic
 MRM Mapping Question « View previous topic :: View next topic » 
Author Message
pfaulkner
PostPosted: Wed Apr 23, 2003 10:15 am    Post subject: MRM Mapping Question Reply with quote

Master

Joined: 18 Mar 2002
Posts: 241
Location: Colorado, USA

If I have an MRM XML message and an MRM Cobol message and I map from the XML to Cobol, do I have to map the fields in the order required?

I would have assumed using MRM that no matter the order I map the fields it would place them in the correct position within the msg, and fill in any fields I don't map with default values....

Is this not the case?
Back to top
View user's profile Send private message AIM Address
RamVijayawada
PostPosted: Wed Apr 23, 2003 10:44 am    Post subject: Reply with quote

Novice

Joined: 22 Apr 2003
Posts: 15

NO matter how u map the fields, they appear in the order of the phsical structure u created..
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Apr 23, 2003 11:20 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

To follow up on what RamVijayawada said,

Yes. Fields are added in the order of your ESQL statements.
Back to top
View user's profile Send private message
pfaulkner
PostPosted: Wed Apr 23, 2003 12:02 pm    Post subject: Reply with quote

Master

Joined: 18 Mar 2002
Posts: 241
Location: Colorado, USA

Jeff, sounds like you are disagreeing with RamVijayawada.

I did run a test and added a trace node, it does appear that the order matches the ESQL and not the physical structure defined in the MRM.
Back to top
View user's profile Send private message AIM Address
RamVijayawada
PostPosted: Wed Apr 23, 2003 12:17 pm    Post subject: Reply with quote

Novice

Joined: 22 Apr 2003
Posts: 15

Trace is controlled by the esql, u see what u write in the esql thatz what trace is, but actually it appears as the physical structure, The only way to change the order is by using REORDER Option...
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Apr 23, 2003 1:26 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Maybe I am disagreeing with RamVijayawada, but only if I misunderstand what he's saying.

My understanding is that the order defined on the types and elements in the MRM is used for parsing the data as it comes out of the bitstream and into the logical message tree. The order of elements in the logical message tree is then used while rebuilding the bitstream on output.

The order of the elements in the logical message tree is determined by ESQL. Fields are stored relative to other fields by how you create them.
Code:
Set OutputRoot.MRM.Field.B = '2';
Set OutputRoot.MRM.Field.A = '1';
will create a bitstream like '21', because you have created A as the NEXTSIBLING of B.

Of course, you can also reorder the tree before output, using a variety of techniques. But the WMQI system is not going to use the MRM model to reorder your tree for you.
Back to top
View user's profile Send private message
pfaulkner
PostPosted: Wed Apr 23, 2003 1:34 pm    Post subject: Reply with quote

Master

Joined: 18 Mar 2002
Posts: 241
Location: Colorado, USA

So based on what you explained....

If I had an MRM defined as follows:

FieldA
FieldB
FieldC

And in my Compute node I mapped as follows:

Set OutputRoot.MRM.FieldA = '1';
Set OutputRoot.MRM.FieldC = '2';

What if I always wanted to include FieldB but it's value should always be ' '. I assume I cannot just create a default value for my Element in the message set and assume it will be populated when rebuilding the output stream????

Would I always need to use code as follows?

Set OutputRoot.MRM.FieldA = '1';
Set OutputRoot.MRM.FieldB = ' ';
Set OutputRoot.MRM.FieldC = '2';
Back to top
View user's profile Send private message AIM Address
kirani
PostPosted: Wed Apr 23, 2003 1:37 pm    Post subject: Reply with quote

Jedi Knight

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

Broker will reorder your elements in the tree if you set the Type composition property of your Compound type to Unordered Set. Please see the following thread for more details:
http://www.mqseries.net/phpBB2/viewtopic.php?t=6653&highlight=composition
_________________
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 » MRM Mapping Question
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.