Author |
Message
|
lokeshraghuram |
Posted: Tue Dec 10, 2013 1:15 am Post subject: TDS message set for CSV file |
|
|
Novice
Joined: 10 Dec 2013 Posts: 14
|
|
Back to top |
|
 |
lokeshraghuram |
Posted: Tue Dec 10, 2013 1:17 am Post subject: Re: TDS message set for CSV file |
|
|
Novice
Joined: 10 Dec 2013 Posts: 14
|
Hello
I tried creating a message set for csv output message. I have created a complex type STUDENT with a group indicator as 01 group terminator as <CR><LF> and delimiter as comma(,). Now suppose the complex type student has two elements NAME and AGE and I give values to these through esql code I am getting following output
01NAME,AGE..,
(dots represent CR and LF)
My doubt is..delimiter is placed after CR-LF and not after AGE..I feel TDS writer is assuming the last element of the complex type and group delimiter as a single element.
1.Could anyone please suggest a way to get the delimiter after the last element and before CR-LF
2. Also is there an option to skip the delimiter after CR-LF..
Expected output:
01NAME,AGE,..
01NAME1,AGE1,.. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Dec 10, 2013 1:28 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Have you looked at the CSV sample in the samples gallery?
I assume you are using WMB v7. If you were using v8 or v9 you would be better off using the DFDL domain, not MRM. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
new_to_wmb8 |
Posted: Tue Dec 10, 2013 3:38 am Post subject: |
|
|
 Centurion
Joined: 28 May 2013 Posts: 127 Location: Hyderabad, India
|
you can use
Quote: |
Reserved Characters as ,<CR><LF> |
|
|
Back to top |
|
 |
lokeshraghuram |
Posted: Tue Dec 10, 2013 5:24 am Post subject: |
|
|
Novice
Joined: 10 Dec 2013 Posts: 14
|
Thanks for the reply kimbert
The mistake that I did was for the complex type delimiter should be used as <CR><LF>. Instead I was using comma and that is why I got comma at the end of every new line character
I am learning DFDL. Could you please tell me if DFDL can be referenced to a message flow in WMB8? like how an MRM message set will be referred using messageset type and messageset format |
|
Back to top |
|
 |
kimbert |
Posted: Tue Dec 10, 2013 6:30 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I am learning DFDL |
Good idea. I suggest that you start by looking at the CSV wizard - it makes things very simple.
Quote: |
Could you please tell me if DFDL can be referenced to a message flow in WMB8? like how an MRM message set will be referred using messageset type and messageset format |
At risk of repeating myself...have you checked the samples gallery? There is at least one example of a message flow that uses DFDL in there.
MRM: You need to specify 3 items : message set , message type and message format.
DFDL: You only need to specify one item : the global element declaration that the parser should use. The other two parameters do not apply to DFDL.
Note that the DFDL properties can be configured in the Input node properties, and the UI should stop you from doing it wrong. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
lokeshraghuram |
Posted: Tue Dec 10, 2013 11:00 am Post subject: |
|
|
Novice
Joined: 10 Dec 2013 Posts: 14
|
Initially I did not refer samples but I started referring them on your suggestion Thanks a lot for your suggestions |
|
Back to top |
|
 |
|