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 » Urgent ESQL Code Help needed Transforming Msg

Post new topic  Reply to topic
 Urgent ESQL Code Help needed Transforming Msg « View previous topic :: View next topic » 
Author Message
yps_sengar
PostPosted: Sun Nov 21, 2010 11:23 am    Post subject: Urgent ESQL Code Help needed Transforming Msg Reply with quote

Newbie

Joined: 05 Feb 2010
Posts: 9

We have a situation where we need to parse a copy book file to a XML structure as below-

Line1: Header record (pipe delimited)
Line2: Detail Record 1 (Pipe delimited)
Line3: Detail Record 2 (Pipe delimited)
Line3: Detail Record 2 (Pipe delimited)
.
.
Line N: Detail Record N-1 (Pipe delimited)

let’s say we have copy book field’s structure as below ---

ordernumber|storenumber|applicationName
itemnumber|errorDesc
itemnumber2|errorDesc
itemnumber3|errorDesc

e.g.

456762|12345|ToStore
123|Error1
124|Error2
154|Error3

Want to transform this file into XML with belo structure

<Order>
<OrderNumber>456762</OrderNumber>
<StoreNumber>12345</StoreNumber>
<AppName>ToStore</AppName>
<AppErr>
<![CDATA
123|Error1
124|Error2
154|Error3
]]>
</AppErr>
</Order>

Note: we want to parse only Header information for each fields.
Details information record in different lines in the file to be combined together and put into one XML field i.e. AppErr as shown above

This looks very easy but not able to achieve this programmatically... Could someone help provide code for implementing this.

The flow design is something like below

FileInput Node --> Compute Node ---> MQOutput

Would Really appreciate your help
Back to top
View user's profile Send private message
mqjeff
PostPosted: Sun Nov 21, 2010 11:47 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

There's very little coding to do here.

It's mostly a matter of organizing your incoming message model correctly.
Back to top
View user's profile Send private message
yps_sengar
PostPosted: Sun Nov 21, 2010 11:57 am    Post subject: Reply with quote

Newbie

Joined: 05 Feb 2010
Posts: 9

It would be really helpful, if you could provide some sample code for this.........
I mean, could you pls. elaborate a little more on the organizing incoming model and ESQL sample etc.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Nov 22, 2010 5:44 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
This looks very easy but not able to achieve this programmatically.
What have you tried? What went wrong?

btw, are you sure that this is from a COBOL copy book? COBOL data is usually fixed-length, but your data has delimiters between the fields.
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 » Urgent ESQL Code Help needed Transforming Msg
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.