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 » Mapping default values

Post new topic  Reply to topic
 Mapping default values « View previous topic :: View next topic » 
Author Message
francoisvdm
PostPosted: Wed Sep 10, 2008 12:13 am    Post subject: Mapping default values Reply with quote

Partisan

Joined: 09 Aug 2001
Posts: 332

Hi, MB V6.0.2 on windows

Input XML is:
<Record>
<Name>Francois</Name>
<Item>
<Line1>Some data</Line1>
<Line2>more data</Line2>
</Item>
</Record>

The output must always have 10 Items, requirement from endpoint system, silly yes, I know, but that is the current situation.

So, what must I do in message set and mapping to ensure my output looks like:
<Record>
<Name>Francois</Name>
<Item>
<Line1>Some data</Line1>
<Line2>more data</Line2>
</Item>
<Item>
<Line1>NULL</Line1>
<Line2>NULL</Line2>
</Item>
.
.
<Item> -- 10th instance
<Line1>NULL</Line1>
<Line2>NULL</Line2>
</Item>
</Record>


Thank you
_________________
If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.

Francois van der Merwe
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Wed Sep 10, 2008 2:07 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Don't know if you use mapping node or ESQL.
For ESQL use:

For your nth occurrence n <= 10 ....

Create lastchild of RecordRef as ItemRef Name 'Item';
Create lastchild of ItemRef Name 'Line1' Value Null;
Create lastchild of ItemRef Name 'Line2' Value Null;

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
francoisvdm
PostPosted: Wed Sep 10, 2008 1:12 pm    Post subject: Reply with quote

Partisan

Joined: 09 Aug 2001
Posts: 332

want to use mapping node if possible....but can't get it to tick
_________________
If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.

Francois van der Merwe
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Sep 10, 2008 1:44 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Should be able to create a for loop 1..10, and map to the indexed target with a COALESCE style source.
Back to top
View user's profile Send private message
francoisvdm
PostPosted: Wed Sep 10, 2008 11:41 pm    Post subject: Reply with quote

Partisan

Joined: 09 Aug 2001
Posts: 332

Very good idea, thanks
_________________
If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.

Francois van der Merwe
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Mapping default values
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.