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 » Flat File to XML conversion using ESQl....

Post new topic  Reply to topic
 Flat File to XML conversion using ESQl.... « View previous topic :: View next topic » 
Author Message
Jithesh shetty
PostPosted: Mon Nov 12, 2007 8:50 pm    Post subject: Flat File to XML conversion using ESQl.... Reply with quote

Acolyte

Joined: 30 Oct 2007
Posts: 51

hi,


I have created XML structure using ESQl coding.....i have to pass the values for that.....

i am sending a input flat file message.....

VMI;INVRPT;VMI_INVRPTD97A_1553;VMI;040611121212;062011121212;032;5038495000019;0027855;GBP;0563754455;1232-2141-5212;VMI;WOKHOhosub/4077;100
VMI;INVRPT;VMI_INVRPTD97A_1553;VMI;040611121212;062011121212;032;5038495000019;0027855;GBP;0812344365;1232-2141-6961;VMI;WOKHOhosub/4066;100


the output should be look like this......

<?xml version="1.0"?>
<VMIINVRPTD97A>
<VMI>
<HEADER>VMI</HEADER>
<MSGTYPE>INVRPT</MSGTYPE>
<DOCUMENTID>VMI_INVRPTD97A_1553</DOCUMENTID>
<FREETEXTID1>VMI</FREETEXTID1>
<DOCISSUEDT>040611121212</DOCISSUEDT>
<INVRPTDT>062011121212</INVRPTDT>
<INVRPTPARTY>032</INVRPTPARTY>
<SUPPLIER>5038495000019</SUPPLIER>
<BUYER>0027855</BUYER>
<CURRENCY>GBP</CURRENCY>
<ITEMREFNO>0563754455</ITEMREFNO>
<ADDITEMREFNO>1232-2141-5212</ADDITEMREFNO>
<FREETEXTID2>VMI</FREETEXTID2>
<LINEITEMREFNO>WOKHOhosub/4077</LINEITEMREFNO>
<QTY>100</QTY>
</VMI>
<VMI>
<HEADER>VMI</HEADER>
<MSGTYPE>INVRPT</MSGTYPE>
<DOCUMENTID>VMI_INVRPTD97A_5003</DOCUMENTID>
<FREETEXTID1>VMI</FREETEXTID1>
<DOCISSUEDT>040611121212</DOCISSUEDT>
<INVRPTDT>062011121212</INVRPTDT>
<INVRPTPARTY>032</INVRPTPARTY>
<SUPPLIER>5038495000019</SUPPLIER>
<BUYER>0027855</BUYER>
<CURRENCY>GBP</CURRENCY>
<ITEMREFNO>0812344365</ITEMREFNO>
<ADDITEMREFNO>1232-2141-6961</ADDITEMREFNO>
<FREETEXTID2>VMI</FREETEXTID2>
<LINEITEMREFNO>WOKHOhosub/4066</LINEITEMREFNO>
<QTY>100</QTY>
</VMI>
</VMIINVRPTD97A>


How to proceed using Esql Coding.....
Back to top
View user's profile Send private message
Jithesh shetty
PostPosted: Mon Nov 12, 2007 9:58 pm    Post subject: Flat File to XML conversion using ESQl Coding.... Reply with quote

Acolyte

Joined: 30 Oct 2007
Posts: 51

Hi,

i am using file extender node picks up the flat file from the folder.....then that flat file should converted into XMl in compute node...


I have created XML structure using ESQl coding.....Now i have to pass the values for that.....

i am sending a input flat file message.....

VMI;INVRPT;VMI_INVRPTD97A_1553;VMI;040611121212;062011121212;032;5038495000019;0027855;GBP;0563754455;1232-2141-5212;VMI;WOKHOhosub/4077;100
VMI;INVRPT;VMI_INVRPTD97A_1553;VMI;040611121212;062011121212;032;5038495000019;0027855;GBP;0812344365;1232-2141-6961;VMI;WOKHOhosub/4066;100


the output should be look like this......

<?xml version="1.0"?>
<VMIINVRPTD97A>
<VMI>
<HEADER>VMI</HEADER>
<MSGTYPE>INVRPT</MSGTYPE>
<DOCUMENTID>VMI_INVRPTD97A_1553</DOCUMENTID>
<FREETEXTID1>VMI</FREETEXTID1>
<DOCISSUEDT>040611121212</DOCISSUEDT>
<INVRPTDT>062011121212</INVRPTDT>
<INVRPTPARTY>032</INVRPTPARTY>
<SUPPLIER>5038495000019</SUPPLIER>
<BUYER>0027855</BUYER>
<CURRENCY>GBP</CURRENCY>
<ITEMREFNO>0563754455</ITEMREFNO>
<ADDITEMREFNO>1232-2141-5212</ADDITEMREFNO>
<FREETEXTID2>VMI</FREETEXTID2>
<LINEITEMREFNO>WOKHOhosub/4077</LINEITEMREFNO>
<QTY>100</QTY>
</VMI>
<VMI>
<HEADER>VMI</HEADER>
<MSGTYPE>INVRPT</MSGTYPE>
<DOCUMENTID>VMI_INVRPTD97A_5003</DOCUMENTID>
<FREETEXTID1>VMI</FREETEXTID1>
<DOCISSUEDT>040611121212</DOCISSUEDT>
<INVRPTDT>062011121212</INVRPTDT>
<INVRPTPARTY>032</INVRPTPARTY>
<SUPPLIER>5038495000019</SUPPLIER>
<BUYER>0027855</BUYER>
<CURRENCY>GBP</CURRENCY>
<ITEMREFNO>0812344365</ITEMREFNO>
<ADDITEMREFNO>1232-2141-6961</ADDITEMREFNO>
<FREETEXTID2>VMI</FREETEXTID2>
<LINEITEMREFNO>WOKHOhosub/4066</LINEITEMREFNO>
<QTY>100</QTY>
</VMI>
</VMIINVRPTD97A>


How to pass the values, so that it will generate xml mesage.......
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Nov 12, 2007 11:34 pm    Post subject: How about this? Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

1 - Create Input Message Model to represent your tagged input
2 - Create Output Message Model to represent your XML Output
3 - Map Input to Output with a Mapping Node.
4 - Finish up with a Compute Node if required (things which can't be mapped easily)
Very little ESQL to write.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
Jithesh shetty
PostPosted: Mon Nov 12, 2007 11:40 pm    Post subject: Flat File to XML conversion using ESQl Coding.... Reply with quote

Acolyte

Joined: 30 Oct 2007
Posts: 51

i didn't get u what is that Input Message Model???????
Back to top
View user's profile Send private message
kirani
PostPosted: Mon Nov 12, 2007 11:53 pm    Post subject: Reply with quote

Jedi Knight

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

First find out what is the pattern of your input message/record. Then model your input message using a Message Set.
_________________
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
Gaya3
PostPosted: Tue Nov 13, 2007 1:10 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

Hi

Input Message Set (TDS)
Output Message Set (XML)
Map it / Write an ESQL to map it

Regards
Gayathri
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Nov 13, 2007 1:49 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

And don't double post!

http://www.mqseries.net/phpBB2/viewtopic.php?t=40459&highlight=
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » Flat File to XML conversion using ESQl....
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.