none
EDIFACT parsing problem RRS feed

  • Question

  •  

    Hi guys!..

    A very simple problem: I'm getting the usual "Illegal character" event, and it comes down to this line:

     

    RFF+ALXSadGSAP):N:*******'

     

    If I remove all the * and replace with a string, it works like a charm. But I anyway it should process correctly , here's the UNB segment:

     

    UNB+UNOD:4+SENDER:ZZZ+RECEIVER:ZZ+070807:0932+26++++1++1'

     

    What's the configuration to change for this file to process correctly?

     

    Thanks!

    Victor

    Wednesday, August 8, 2007 2:32 PM

Answers

  • Empty max occurs means its set to 1. You can verify this by opening the schema in Visual Studio, clicking on the EDI view tab on the botton next to the XSD view, expanding the tree node on the left and selecting the required field (in this case c50604). Doing so will select the same field with lots of useful information on the right like min/max length, min/max occurs etc.

     

    There are two work around for this.

    1. Change the max occurs of this field in the schema to the required number of repetitions (10 would be ok). Redeploy the modified schema and try again.

     

    2. Insert Release Character (in this case "?") before each star(*) so the EDI Receive pipeline knows that this is data and not a separator. So it would look something like RFF+ALXGSAP):N:?*?*?*?*?*?*?*'

     

    Let me know if this helps

    Mohsin

    Wednesday, August 8, 2007 10:19 PM
  • Victor,

     

    I appologize for some confusion here. I checked with the standards and our implementation, and we do not allow repetition of sub-component fields. So in this case, c50604 can only occur once in the schema. If you try to increase it, you will see the error that you see.

     

    Try changing UNA5 to something other than star(*) and let me know if this works.

     

    Since you are getting delimiter collision (you are using the repitition separator in a data field), you can either go with option 2 where you can use release indicator to signal to the EDI Receive Pipeline that the following element is data, 

    or change Repetition Separator to something other than a star(*).

     

    Thanks

    Mohsin

    Thursday, August 9, 2007 5:39 PM

All replies

  • Here are a couple of questions for you

     

    1. What is the exact error message that you are getting in the event viewer?

    2. What is the UNA segment for this file?

     

    It looks like the repetition separator might be a star(*), and the field might not be allowed to repeat.

     

    Thanks

    Mohsin

     

    Wednesday, August 8, 2007 7:16 PM
  • Thanks for the answer Mohsin:

     

    1. The error is (replaced sender data):

     

    Event ID 8118

     

    Error encountered during parsing. The Edifact transaction set with id '1' contained in interchange (without group) with id '26', with sender id 'SENDER', receiver id 'RECEIVER' is being suspended with following errors:

    Error: 1 (Field level error)

    SegmentID: RFF

    Position in TS: 6

    Data Element ID: C50604

    Position in Segment: 2

    Position in Field: 4

    Data Value:

    37: Invalid character(s) found in data element

     

    2. Here'es the UNA:      UNA : + . ? * '  (I added the spaces to avoid any emoticon replacement)

     

    Wednesday, August 8, 2007 7:53 PM
  • This looks like a repetition issue since UNOD allows (*) as a valid character. Either the issue is

     

    1. Field C50604 is not allowed to repeat (max occurs is 1). From the data we see that it has a bunch of stars(*) that is causing the EDI Disassembler to believe that this field is repeating since UNA 5 (which is the repetition delimiter) is set to a star(*)

     

    2. If the field is allowed to repeat (max occurs > 1), the field does not allow blank repetitions (min occurs >= 1).

     

    Could you please verify both so that I can isolate the issue.

     

    Thanks

    Mohsin

     

    Wednesday, August 8, 2007 8:08 PM
  • Thanks again for the answer.

     

    1. I checked the PRICAT schema, and c50604 has the max occurs empty, so I can asume it allows repetition.

     

    2.Min occurs for the same field is 0.

     

    Strange thing.

    Wednesday, August 8, 2007 8:38 PM
  • Empty max occurs means its set to 1. You can verify this by opening the schema in Visual Studio, clicking on the EDI view tab on the botton next to the XSD view, expanding the tree node on the left and selecting the required field (in this case c50604). Doing so will select the same field with lots of useful information on the right like min/max length, min/max occurs etc.

     

    There are two work around for this.

    1. Change the max occurs of this field in the schema to the required number of repetitions (10 would be ok). Redeploy the modified schema and try again.

     

    2. Insert Release Character (in this case "?") before each star(*) so the EDI Receive pipeline knows that this is data and not a separator. So it would look something like RFF+ALXGSAP):N:?*?*?*?*?*?*?*'

     

    Let me know if this helps

    Mohsin

    Wednesday, August 8, 2007 10:19 PM
  • Great answer, and I will go for option 1, since the second one is not possible ( I cannot ask the trading partner to add the ? before the * ).

     

    I go to the PRICAT schema in my biztalk project and configure the maxOccur= 10 in the c50604 but I get a compile error of the schema:

     

    "Component can not repeat, it has an invalid repetition count of 10"

     

    Do you know how to solve that?

     

    Thanks!!!

    Victor

     

     

    Thursday, August 9, 2007 2:28 AM
  • Victor,

     

    I appologize for some confusion here. I checked with the standards and our implementation, and we do not allow repetition of sub-component fields. So in this case, c50604 can only occur once in the schema. If you try to increase it, you will see the error that you see.

     

    Try changing UNA5 to something other than star(*) and let me know if this works.

     

    Since you are getting delimiter collision (you are using the repitition separator in a data field), you can either go with option 2 where you can use release indicator to signal to the EDI Receive Pipeline that the following element is data, 

    or change Repetition Separator to something other than a star(*).

     

    Thanks

    Mohsin

    Thursday, August 9, 2007 5:39 PM