|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
DFDL error |
« View previous topic :: View next topic » |
Author |
Message
|
laddu858 |
Posted: Thu Jun 19, 2014 8:12 am Post subject: DFDL error |
|
|
Novice
Joined: 19 May 2008 Posts: 10
|
Hi Guys, Please need some help on the dfdl,
I have a input message with csv format(see below) and i was able to parse the message successfully, but how can i handle the 'XOA' and the value at the end of the message ( 340) in dfdl.
I/P message:
20140618,211138.337,01,0741,20140627,XXX,XXX,P, 0, 20, 0, 0, 379,CBP, 140, 140, 140, 140, 140, 140, 140, 220, 300,LBP, 380, 380, 380, 380, 380, 380, 380, 380, 380,OBP, 380, 380, 380, 380, 380, 380, 380, 380, 380,RBP, 380, 380, 380, 380, 380, 380, 380, 380, 380
20140618,211140.125,01,1557,20140703,XXX,XXX,Y, 242, 33, 0, 0, 0,CBP, 220, 220, 220, 220, 220, 220, 220, 220, 220,LBP, 220, 220, 220, 220, 220, 220, 220, 220, 220,OBP, 220, 220, 220, 220, 220, 220, 220, 220, 220,RBP, 220, 220, 220, 220, 220, 220, 220, 220, 220
340 |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jun 19, 2014 8:57 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
What "XOA" at the end of the message?
If you mean x'0A', i.e. a byte value indicating the end of a line on some platforms, DFDL handles that out of the box - why do you need to?
The fact that the message was parsed successfully (in your words) does imply that the DFDL parser has managed it, or you would have got an "unexpected character" message.
Define your problem more clearly. Like posting the error you did receive from DFDL. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jun 19, 2014 12:08 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
As Vitor says, we need more information. Please quote the error message, or ( even better ) the relevant part of the DFDL trace. _________________ 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 |
|
 |
laddu858 |
Posted: Thu Jun 19, 2014 12:50 pm Post subject: |
|
|
Novice
Joined: 19 May 2008 Posts: 10
|
Thanks for the replay Vitor and Kim.
Sorry it was a whitespace(0x20) and my input has whitespace and value. I am not sure how to handle that.
I was able to parse the first two records from input msg, and 3rd record has whitespace and value, that will be the end of data.
In the delimiters field, i have put the termination as "%NL;", what should it be for whitespace("%WSP;" and number) is there way to handle it?
Jun 19, 2014 2:38:24 PM info: Offset: 607. Found delimited value: ' 220' for element 'RBP_Two_Seats'. The delimiter was ','.
[dfdl = /MMLIB_ESeamlessToLHOutbound/DFDLSchema_ESeamlessToLHOutbound.xsd, scd = #xscd(/schemaElement::body/type::0/model::sequence/schemaElement::RBP_Two_Seats), 104]
Jun 19, 2014 2:38:24 PM info: Offset: 612. Finished processing element 'RBP_Two_Seats'.
[dfdl = /MMLIB_ESeamlessToLHOutbound/DFDLSchema_ESeamlessToLHOutbound.xsd, scd = #xscd(/schemaElement::body/type::0/model::sequence/schemaElement::RBP_Two_Seats), 65]
Jun 19, 2014 2:38:24 PM info: Offset: 612. Found separator ',' owned by the 'sequence' group contained within element 'body'.
[dfdl = /MMLIB_ESeamlessToLHOutbound/DFDLSchema_ESeamlessToLHOutbound.xsd, scd = #xscd(/schemaElement::body/type::0/model::sequence), 103]
Jun 19, 2014 2:38:24 PM info: Offset: 613. Starting to process element 'RBP_One_Seat'.
[dfdl = /MMLIB_ESeamlessToLHOutbound/DFDLSchema_ESeamlessToLHOutbound.xsd, scd = #xscd(/schemaElement::body/type::0/model::sequence/schemaElement::RBP_One_Seat), 64]
Jun 19, 2014 2:38:24 PM info: Offset: 613. Found delimited value: ' 220' for element 'RBP_One_Seat'. The delimiter was '%NL;'.
[dfdl = /MMLIB_ESeamlessToLHOutbound/DFDLSchema_ESeamlessToLHOutbound.xsd, scd = #xscd(/schemaElement::body/type::0/model::sequence/schemaElement::RBP_One_Seat), 106]
Jun 19, 2014 2:38:24 PM info: Offset: 618. Finished processing element 'RBP_One_Seat'.
[dfdl = /MMLIB_ESeamlessToLHOutbound/DFDLSchema_ESeamlessToLHOutbound.xsd, scd = #xscd(/schemaElement::body/type::0/model::sequence/schemaElement::RBP_One_Seat), 64]
Jun 19, 2014 2:38:24 PM info: Offset: 618. Found terminator '%NL;' for 'body'.
[dfdl = /MMLIB_ESeamlessToLHOutbound/DFDLSchema_ESeamlessToLHOutbound.xsd, scd = #xscd(/schemaElement::body), 56]
Jun 19, 2014 2:38:24 PM info: Offset: 620. Finished processing element 'body'.
[dfdl = /MMLIB_ESeamlessToLHOutbound/DFDLSchema_ESeamlessToLHOutbound.xsd, scd = #xscd(/schemaElement::body), 56]
Jun 19, 2014 2:38:24 PM info: Offset: 620. Optional element 'body' encountered. The DFDL parser will return to this position if the element is not present in the data stream.
[dfdl = /MMLIB_ESeamlessToLHOutbound/DFDLSchema_ESeamlessToLHOutbound.xsd, scd = #xscd(/schemaElement::body), 152]
Jun 19, 2014 2:38:24 PM info: Offset: 620. Starting to process element 'body'.
[dfdl = /MMLIB_ESeamlessToLHOutbound/DFDLSchema_ESeamlessToLHOutbound.xsd, scd = #xscd(/schemaElement::body), 56]
Jun 19, 2014 2:38:24 PM info: Offset: 620. Starting to process element 'System_Date'.
[dfdl = /MMLIB_ESeamlessToLHOutbound/DFDLSchema_ESeamlessToLHOutbound.xsd, scd = #xscd(/schemaElement::body/type::0/model::sequence/schemaElement::System_Date), 63]
Jun 19, 2014 2:38:24 PM info: Offset: 624. The simple content region of element 'System_Date' does not match the literal nil value.
[dfdl = /MMLIB_ESeamlessToLHOutbound/DFDLSchema_ESeamlessToLHOutbound.xsd, scd = #xscd(/schemaElement::body/type::0/model::sequence/schemaElement::System_Date), 109]
Jun 19, 2014 2:38:24 PM info: Offset: 620. Found delimited value: ' 340' for element 'System_Date'. The delimiter was 'End of data stream'.
[dfdl = /MMLIB_ESeamlessToLHOutbound/DFDLSchema_ESeamlessToLHOutbound.xsd, scd = #xscd(/schemaElement::body/type::0/model::sequence/schemaElement::System_Date), 118]
Jun 19, 2014 2:38:24 PM info: Offset: 624. Finished processing element 'System_Date'.
[dfdl = /MMLIB_ESeamlessToLHOutbound/DFDLSchema_ESeamlessToLHOutbound.xsd, scd = #xscd(/schemaElement::body/type::0/model::sequence/schemaElement::System_Date), 63]
Jun 19, 2014 2:38:24 PM error: CTDP3058E: Separator ',' not found at offset '624' for sequence or choice within element '/MSG_ESeamlessToLHOutbound_Output[1]/body[3]'.
Jun 19, 2014 2:38:24 PM info: Offset: 624. Parser was unable to resolve data on the current branch and will evaluate the next available branch beginning at offset '620' owned by the 'sequence' group contained within element 'MSG_ESeamlessToLHOutbound_Output'.
[dfdl = /MMLIB_ESeamlessToLHOutbound/DFDLSchema_ESeamlessToLHOutbound.xsd, scd = #xscd(/schemaElement::MSG_ESeamlessToLHOutbound_Output/type::0/model::sequence), 237]
Jun 19, 2014 2:38:24 PM info: Offset: 620. Occurrence '3' of element 'body' was not found in the data. occursCountKind is 'implicit' so no more occurrences of this element will be expected.
[dfdl = /MMLIB_ESeamlessToLHOutbound/DFDLSchema_ESeamlessToLHOutbound.xsd, scd = #xscd(/schemaElement::body), 168]
Jun 19, 2014 2:38:24 PM info: Offset: 620. Finished processing element 'MSG_ESeamlessToLHOutbound_Output'.
[dfdl = /MMLIB_ESeamlessToLHOutbound/DFDLSchema_ESeamlessToLHOutbound.xsd, scd = #xscd(/schemaElement::MSG_ESeamlessToLHOutbound_Output), 84]
Jun 19, 2014 2:38:24 PM fatal: CTDP3002E: Unexpected data found at offset '620' after parsing completed. Data: '0x20...'.
----
Input Message:
20140618,211138.337,01,0741,20140627,XXX,XXX,P, 0, 20, 0, 0, 379,CBP, 140, 140, 140, 140, 140, 140, 140, 220, 300,LBP, 380, 380, 380, 380, 380, 380, 380, 380, 380,OBP, 380, 380, 380, 380, 380, 380, 380, 380, 380,RBP, 380, 380, 380, 380, 380, 380, 380, 380, 380
20140618,211140.125,01,1557,20140703,XXX,XXX,Y, 242, 33, 0, 0, 0,CBP, 220, 220, 220, 220, 220, 220, 220, 220, 220,LBP, 220, 220, 220, 220, 220, 220, 220, 220, 220,OBP, 220, 220, 220, 220, 220, 220, 220, 220, 220,RBP, 220, 220, 220, 220, 220, 220, 220, 220, 220
340
[/url][/code] |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jun 19, 2014 1:07 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Your data format seems to be a header/body/trailer format. That's a very common type of data format, and I answered a question about it last week:
http://www.mqseries.net/phpBB2/viewtopic.php?t=67624
You need to do the same thing : model the trailer record explicitly, and put a discriminator on the body record. _________________ 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 |
|
 |
mqjeff |
Posted: Thu Jun 19, 2014 1:13 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
laddu858 wrote: |
Thanks for the replay Vitor and Kim. |
To be entirely inaccurate, you should have said "ViCtor and Kim".
kimbert is not a Kim. Unless you've got a bad head-cold. |
|
Back to top |
|
 |
laddu858 |
Posted: Thu Jun 19, 2014 2:38 pm Post subject: |
|
|
Novice
Joined: 19 May 2008 Posts: 10
|
Thanks Kimbert, I will create the dfdl and let you guys know if I find any issues. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jun 20, 2014 4:38 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
kimbert is not a Kim. Unless you've got a bad head-cold. |
That's a really bad,bad cold (no offense intended sir) _________________ Honesty is the best policy.
Insanity is the best defence. |
|
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
|
|
|
|