none
Element field length RRS feed

  • Question

  • I have an EDI send port where I am sending X12 850 messages.  "EdiDataValidation" is "True" in the pipeline. 

    We recently had a message where the data in N1-02 was longer than it should have been (62 characters rather than 60), but there was no error from the pipeline.  In the past, this same send port has correctly given us "Data element too long" failures for REF02.

    The CharacterSet in the pipeline is set to UTF8.  The values did contain German characters (Groß Dölln).  However, if anything I would expect these "special" characters to cause the pipeline component to consider the data to be longer than it actually was, not shorter.

    Has anyone experienced the EDI data validation not correctly evaluating the length of the data?

    Thursday, July 5, 2012 7:39 PM

Answers

  • Assuming there were no encoding errors (Unicode, UTF8, ...), I believe the EDI pipeline components count characters in normalized format of UTF8 (BizTalk's normalized encoding).   So I believe the question is how many characters are in the field rather than how many bytes are in the field.

    I haven't worked with the EDI pipelines for a long time, so there might be a setting to count by bytes (similar to the flat file disassembler).


    David Downing... If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.

    Tuesday, July 10, 2012 4:30 AM

All replies

  • the length of 62 characters is that with or without escape characters.

    I believe that the length is measured on actual characters, but afterwards the text content will be escaped.
    BOth the German characters would indeed conceed 2 bytes (when looked in binary view). So this could maybe explain the 2 extra characters.

    Could you verify the send content from tracking in binary view? are there actually 60 or 62 characters shown?

    Friday, July 6, 2012 2:16 PM
  • Make sure you added the BOM headers. http://blogs.msdn.com/b/atinag/archive/2009/03/19/edi-pipeline-with-character-set-extended.aspx

    Thanks, Raja MCTS BizTalk Server 2010, MCC If this answers your question please mark it accordingly

    Friday, July 6, 2012 2:22 PM
  • If you count the German characters as a single byte each, it is 62 characters long.  If you count them as 2 bytes it would be even longer.  So no matter how you count the text, it is longer than 60 characters and should have resulted in an EDI error.  But it did not.  The pipeline passed the data through without complaining.

    Monday, July 9, 2012 3:03 PM
  • Assuming there were no encoding errors (Unicode, UTF8, ...), I believe the EDI pipeline components count characters in normalized format of UTF8 (BizTalk's normalized encoding).   So I believe the question is how many characters are in the field rather than how many bytes are in the field.

    I haven't worked with the EDI pipelines for a long time, so there might be a setting to count by bytes (similar to the flat file disassembler).


    David Downing... If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.

    Tuesday, July 10, 2012 4:30 AM
  • Actually I've seen messages, where the encoding was indeed misinterpreted, that caused the 2 byte single character to be read in BizTalk as 2 separate single characters (wrongfully of course). That's why I asked. But as you said this was caused by a faulty encoding.

    twhensley,
    Would it be possible to post the full text content that caused the error?
    This way I can do some tests myself and try to find the cause of this.

    • Edited by mitchke Friday, June 24, 2016 10:47 AM
    Tuesday, July 10, 2012 7:34 AM