|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
CSV Message modelling issue |
« View previous topic :: View next topic » |
Author |
Message
|
wmbuser |
Posted: Fri Jan 14, 2011 9:01 am Post subject: CSV Message modelling issue |
|
|
Newbie
Joined: 14 Jan 2011 Posts: 2
|
Hi,
I have a requirment to parse the below message
"data1"|"data2"
"data"|"data"
"abc"|"def"
"efg"|"hij"
1) There are n number of rows. The first 2 rows are the header data, which currently is of no importance.
2) Need to parse data from the third row.
3) The quotes are always included around every field. We do not require the quotes to be present in the parsed data.
4) The fields in the data row can have a quote character escaped by itself.(""abc""|"def")
5) After parsing, the message tree would be something similar to
MRM
----header
row1-"data1"|"data2"
row2 - "data"|"data"
----data
field1 - abc
field2 - def
----data
field1 - efg
field2 - hij
I did try using groups with data pattern option, and also tried to delimit using <CR><LF> character(error saying quote character not allowed).
Please do help with your suggestions.
Thanks |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Jan 14, 2011 9:05 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
What have you done to model this? |
|
Back to top |
|
 |
wmbuser |
Posted: Fri Jan 14, 2011 10:12 am Post subject: |
|
|
Newbie
Joined: 14 Jan 2011 Posts: 2
|
I have tried the following
1) element name="message"
----complexType "Headertype" dataElementSeparation="All Element Delimited" (delimiter=<CR><LF>)
--------element name="Row" (occurence = 2, <CR><LF> repeat ref)
----complexType "BodyType" dataElementSeparation="All Element Delimited" (delmiter = |)
--------element name="Body"
----------------element name="field1"
----------------element name="field2"
Get an error "Quote character not allowed ".
2) element name="message"
----complexType "Headertype" dataElementSeparation="Use Data Pattern" ( GI : ", GT: <CR><LF>)
--------element name="Row" (pattern= [.*] occurence = 2, <CR><LF> repeat ref)
----complexType "BodyType" dataElementSeparation="All Element Delimited" (delmiter = |)
--------element name="Body"
----------------element name="field1"
----------------element name="field2"
Get an error "Missing markup following a complex child or group". |
|
Back to top |
|
 |
kimbert |
Posted: Mon Jan 17, 2011 2:00 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Get an error "Quote character not allowed ". |
Please quote the full text of the errors. You can get that by
- looking in Windows Event Viewer or
- taking a user trace or
- Googling for the BIPnnnE error code
Tip: Don't bother with the ---- for indentation. Use [code] tags instead - they put your data into a monospace font which automatically preserves indentation. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|