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 flat field structure to single repeating element

Post new topic  Reply to topic
 Mapping flat field structure to single repeating element « View previous topic :: View next topic » 
Author Message
OfficeWorker
PostPosted: Wed May 08, 2013 4:02 pm    Post subject: Mapping flat field structure to single repeating element Reply with quote

Novice

Joined: 05 Aug 2012
Posts: 11

Hi All,

I'm trying to map from a flat structure where each system has it's own node.

Code:

<source>
<system_ABC>
   <date>9/5/12</date>
   <status>ON</status>
</system_ABC>
<system_DEF>
   <date>2/5/12</date>
   <status>OFF</status>
</system_DEF>
</source>


to a single repeating element

Code:

<target>
<system>
   <date>9/5/12</date>
   <status>ON</status>
   <systemCode>ABC</systemCode>
</system>
<system>
   <date>2/5/12</date>
   <status>OFF</status>
   <systemCode>DEF</systemCode>
</system>
</target>


Is there a way to do this using a WMB7 mapping node?
Seems like it should be easy to do, but I'm just a little stuck atm
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu May 09, 2013 12:04 am    Post subject: Reply with quote

Grand High Poobah

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

Well, let's see:
You need a function to read the tagname
You need a function to transform the tagname
you need a function to set / replace the tagname
You need to map the content accordingly....

This part is easier to do in ESQL than in a mapping node as the tagname is not predefined...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Thu May 09, 2013 1:20 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I agree with fjb_saper - ESQL is the way to go here. Remember to use REFERENCE variables when looping.
Back to top
View user's profile Send private message
OfficeWorker
PostPosted: Thu May 09, 2013 5:47 pm    Post subject: Reply with quote

Novice

Joined: 05 Aug 2012
Posts: 11

ok thanks guys!

ESQL it is
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 » Mapping flat field structure to single repeating element
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.