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 » CSV TO XML

Post new topic  Reply to topic
 CSV TO XML « View previous topic :: View next topic » 
Author Message
mahek
PostPosted: Wed Feb 23, 2005 12:17 pm    Post subject: CSV TO XML Reply with quote

Voyager

Joined: 10 Sep 2004
Posts: 87

Hi all,
I have a CSV(Comma seprated values) format which i have to convert to XML.
i have like 40 fileds in the CSV associated with a particular item which have to converted to XML.I am abel to convert the CSV TO XML with one item with 40 fields .But the problem is that i will be getting one CSV file contaning 5 items or more which will be having the same 40 fields for some items i have to create a XML MESSAGE and for some items i have to insert in to database.I am not sure how to do this can any one can tell me how to solve this.

Thanks in advance
Back to top
View user's profile Send private message
ramukurra
PostPosted: Wed Feb 23, 2005 4:06 pm    Post subject: databasevalues Reply with quote

Novice

Joined: 10 Mar 2004
Posts: 18
Location: CT

Hi,

You can PASSTHRU a SELECT statement to bring the database values and save them in Environment Variables.
Then you can assign these DATABASE Values to the Item Field you talking about by using condition statements.
Hope you know that you have to add the DATABASE TABLES TO YOUR FLOW NODES .

This is my openion.Any one can correct if I am wrong.

Ram
Back to top
View user's profile Send private message
JT
PostPosted: Wed Feb 23, 2005 5:10 pm    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Are you currently using a Compute node to map your CSV input message to the XML output message?

If so, you can add a SQL Insert call into the same Compute node. As you iterate through the multiple occurrences of 'items', I presume there is some value that determines the destination of the 'item', either an insert into the database or mapping to the output XML message.

How much detail are you seeking?
Back to top
View user's profile Send private message
ramukurra
PostPosted: Wed Feb 23, 2005 9:39 pm    Post subject: I missed it Reply with quote

Novice

Joined: 10 Mar 2004
Posts: 18
Location: CT

Hi ,

I missed it

mahek wrote i have to insert in to database.



Ram
Back to top
View user's profile Send private message
mahek
PostPosted: Thu Feb 24, 2005 6:43 am    Post subject: Reply with quote

Voyager

Joined: 10 Sep 2004
Posts: 87

Hi all,
I am abel to insert into the data base also but for only one item .I am not abel to do it for multipel items.If i get a CSV file for one item containing 40 fields i am abel to do every thing but if i get a CSV file(ONE FILE) having 5 items A,B,C,D,E having 40 fields for corresponding Items A,B,C,D,E then i am not abel to handle this .I want to know what extra i have to do for handling this 5 items A,B,C,D,E each HAVING the same 40 fileds(attribute's) .Suppose ITEM A has to be converted to XML ITEM B to be inserted into data base and C,D,E converted to XML, So i will be having 1 database insert and 4 different XML messages sent to the same OUTPUT queue.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Feb 24, 2005 7:03 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You need to model your CSV file so that it will indicate repeating occurances of your group of 40 fields. NOT, mind you, repeating occurances of each field, but repeating occurances of the WHOLE SET of fields.

This will involve creating a complex type that contains those fields, and then creating an element of that complex type.

Then, in your ESQL, you will access the repeats of that complex type as if the entire message was an array. So if you had GROUPFIELD as your element name, you would access Root.Message.GROUPFIELD[1], Root.Message.GROUPFIELD[2], and etc.

Then you can look at the subfields you want, and make a choice of what to do, either an insert or a convert to XML step.

Have you taken any training on WBIMB? This is fairly normal usage of the product, and any training you took should have covered this. Maybe you should read some of the redbooks on WBIMB.
_________________
I am *not* the model of the modern major general.
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 » CSV TO XML
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.