Author |
Message
|
prasantkumarmoharana |
Posted: Sat Aug 20, 2011 12:32 am Post subject: Edifact Message parsing issue |
|
|
Newbie
Joined: 29 Mar 2010 Posts: 9
|
Hi,
I am parsing an edifact message using message broker. In this message, i am facing a parsing problem with ODI tag. It comes like this
UNH...........<FS>ODI<FS>.......UNT
and it fails to parse at ODI tag.
What should be the separators i should use in this case.
Generally, i am using <U+001D> for Delimiter which is working fine with other tags.
ODI is defined as having elements which are optional as
a) Number
b) Name
Appreciate any kind of help. |
|
Back to top |
|
 |
prasantkumarmoharana |
Posted: Mon Aug 22, 2011 1:48 am Post subject: |
|
|
Newbie
Joined: 29 Mar 2010 Posts: 9
|
One more thing to add is whenever i use the message content as
<FS>ODI<GS>value1<GS>value2<FS>. This works fine. but, my requirement is to use separators such that my edifact message will be parsed using <FS>ODI<FS> only. |
|
Back to top |
|
 |
kimbert |
Posted: Mon Aug 22, 2011 2:37 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I am parsing an edifact message using message broker. |
Please answer all questions:
Q1: Are you using the MRM parser with a TDS physical format? Or are you using WTX?
Q2: Did you construct the model yourself, or did you purchase the EDIFACT message set from IBM?
Q3: If you constructed the model yourself (using MRM/TDS), did you set the messaging standard to 'EDIFACT' and set the delimiters to 'EDIFACT_CS' and 'EDIFACT_DS'? |
|
Back to top |
|
 |
prasantkumarmoharana |
Posted: Tue Aug 23, 2011 1:16 am Post subject: |
|
|
Newbie
Joined: 29 Mar 2010 Posts: 9
|
Hi Kimbert,
Following are the answers :-
Q1: Are you using the MRM parser with a TDS physical format? Or are you using WTX?
A: Using MRM parser with a TDS physical format.
Q2: Did you construct the model yourself, or did you purchase the EDIFACT message set from IBM?
A: I have constructed the model myself and it is working for the other segment tags.
Q3: If you constructed the model yourself (using MRM/TDS), did you set the messaging standard to 'EDIFACT' and set the delimiters to 'EDIFACT_CS' and 'EDIFACT_DS'?
A: Yes, the messaging standard is set to 'EDIFACT'. We are using <U+001F> for component separator and <U+001D> for Group separator. |
|
Back to top |
|
 |
mqsiuser |
Posted: Tue Aug 23, 2011 1:30 am Post subject: |
|
|
 Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
prasantkumarmoharana wrote: |
Q2: Did you construct the model yourself, or did you purchase the EDIFACT message set from IBM?
A: I have constructed the model myself and it is working for the other segment tags. |
I wouldn't want to construct an EDIFACT message set myself. I am sure that there can be a lot of formats EDIFACT can have that you might not be able to properly consider.
Anyway... its a standard, everyone knows about it and there are pre-build things for that (IBM makes business out of the problem and sells you these complicated message sets).
I have used ORDERS96A (it was provided as a message set in a sample from IBM). We were lucky and able to use it for production. There were quite some complicated tricks applied within the message set... I wouldn't want to do that myself.
The Mapping of EDIFACT (ORDERS96A) is tedious enough. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Aug 23, 2011 3:31 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
We are using <U+001F> for component separator and <U+001D> for Group separator. |
That's incorrect. The EDIFACT delimiters can change from one document to another based on the contents of the service string in the header.
You *must* use the special EDIFACT mnemonics for the delimiters, and you *must* set those delimiters by identifying the element that models the service string as a an EDIFACT service string. You do that using the 'Interpret Element Value' property. |
|
Back to top |
|
 |
prasantkumarmoharana |
Posted: Tue Aug 23, 2011 5:48 am Post subject: |
|
|
Newbie
Joined: 29 Mar 2010 Posts: 9
|
That's true kimbert. I am setting all the required delimiters and edifact mnemonics.
Also, the message is getting parsed correctly till a tag called ODI comes in the message. This tag is a marker before the start of other tags.
This tag comes in the message without it's elements like <FS>ODI<FS> where <FS> is the segment separator.
ODI is a mandatory tag containing two optional fields Number and Name.
Take a sample like this
UNH......<FS>TIF<GS>Name<GS>January<FS>ODI<FS>EMS<GS>123<US>656<FS>......................UNT
My requirement is to pass <FS>ODI<FS> in the message where ODI is a tag without containing it's elements.
Now, what should be the separators or any configuration i should make in the complex type of ODI to be successfully parsed? |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Aug 23, 2011 5:52 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You need to determine what error messages or etc. is causing the model to halt at this element, and then adjust the model so that it properly allows this element to have optional children that are entirely missing. |
|
Back to top |
|
 |
prasantkumarmoharana |
Posted: Tue Aug 23, 2011 10:09 pm Post subject: |
|
|
Newbie
Joined: 29 Mar 2010 Posts: 9
|
That true mqjeff but my model seems to be working for all other message. Ok, is there a way of making separators as optional in message broker for edifact messaging. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Aug 24, 2011 2:11 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Well...if you want help then you need to describe the problem in more detail. Quote the error messages that you are getting. Describe everything that you have tried so far, and what happened. Ideally, take a debug-level user trace and post the relevant section ( using [c o d e] tags please ). |
|
Back to top |
|
 |
|