Author |
Message
|
blue_figure |
Posted: Wed Aug 10, 2011 8:35 am Post subject: Text to Xml using File to File |
|
|
Newbie
Joined: 10 Aug 2011 Posts: 3
|
Hello Everybody,
I am very new to WMB family and have learnt a lot from previous threads posted on this forum.
I am now trying to understand the Message Sets and would appreciate your help to understand the flow properly.
I am trying File to File flow and my input file will have a text message and I want it to be transformed to XML using Compute or any other best function. The input text will be like below,
EmpNo(2)EmpName(10)EmpAge(2)EmpDesignation(10)
01John28Manager
02Anne32Accountant
03Michael44Engineer
I would like to transform the above text file to XML output. What message set and message definition should I create which fullfil my requirement
Would appreciate if step by step could be assisted
Sorry for asking some silly question here
thanks
Mendi |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 10, 2011 8:43 am Post subject: Re: Text to Xml using File to File |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
blue_figure wrote: |
What message set and message definition should I create which fullfil my requirement |
You'll need a message set which will allow WMB to identify the fields in your input. This example you've quoted is a little odd, with the header row indicating lengths that the data values don't conform to. So identify how you identify the fields, and build a message set accordingly.
Then just map that onto the output. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
blue_figure |
Posted: Wed Aug 10, 2011 8:51 am Post subject: |
|
|
Newbie
Joined: 10 Aug 2011 Posts: 3
|
Thanks for your prompt reply, Actually the header has the maximum length of the fields and the actual data would have spaces if they are less than their respective max length.
Would appreciate more if you could elaborate more on message set and its definition properties
Many Thanks |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Aug 10, 2011 8:54 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
This is not a training forum.
You are asking for assistance that is covered in the first couple of days of the WMB developer class.
You should either attend that class, or go find self-study resources of your own.
A message set is a type of project that contains one or more message definitions.
A message definition is a description of the logical and physical layout of a message. |
|
Back to top |
|
 |
blue_figure |
Posted: Wed Aug 10, 2011 9:03 am Post subject: |
|
|
Newbie
Joined: 10 Aug 2011 Posts: 3
|
Sorry for asking this question here!! Actually I read and understood the Message set and Message Definition but could not find good examples
Anyway Thanks a lot |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Aug 10, 2011 9:04 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
It's fine to answer the question, but if you want a good response, you need to provide detailed information. Particularly about your own level of skill...
You should look at the Samples that come with the product. In particular, look at the CSV samples, and the Airplane sample. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 10, 2011 9:42 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
blue_figure wrote: |
Would appreciate more if you could elaborate more on message set and its definition properties |
That's rather a "how do I use WMB" question. As my associate points out, we're not a training resource nor can we do the task for you (insurance, liability, you having to tell your manager the code was supplied by a bunch of strangers on the Internet, all sorts of reasons).
Aside from the excellent suggestions of my most worthy associate (which I fully endorse), it seems to me that the file in question looks a lot like a series of fixed length, space filled records being produced by a C or COBOL structure. If this is the case, I'll remind you that WMB can import such structures and produce message sets from them.
A small fish because today is going well here. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|