none
Flat File Schema issues RRS feed

  • Question

  • Hi
    Please help me to resolve one Flat File Schema issue. When I do "Validate Instance" of a flat file schema I am getting below error. I tried many options but no luck. Please help. I can send my Schema and test file.

    error BEC2004: Unexpected end of stream while looking for: 'D'

    The current definition being parsed is VSP_Eligibility_Record. The stream offset where the error occured is 9238. The line number where the error occured is 20. The column where the error occured is 0.

    Friday, February 6, 2009 5:54 PM

Answers

  • This error occurs when the flat-file parser is looking for a tag, I guess you used the character D, but it gets to the end of the message stream before finding it. I would find in your schema where you are expecting a D and see if the data looks different than your schema.

    Thanks,
    If this answers your question, please use the "Answer" button to say so | Ben Cline
    • Marked as answer by edhickey Monday, February 16, 2009 11:40 PM
    Saturday, February 7, 2009 2:17 AM
    Moderator
  • This error is most often caused because you are a fixed-length flat file but your data is not of the correct length.


    Say you have record A with one element defined length 10 followed by record D with one element of length 10 (ignoring separators for the moment)

    A1234567890D1234567890

    The above is what the records should look like.

    But suppose your data is like this:

    A123456789D1234567890

    The parser will read record A as A with data 123456789D.  See how it has read the D as the tenth data character.  Now the parser is looking for the D that starts the second record but can't find it because it has already been read.

    Jim
    • Marked as answer by edhickey Monday, February 16, 2009 11:40 PM
    Monday, February 9, 2009 7:41 PM

All replies

  • This error occurs when the flat-file parser is looking for a tag, I guess you used the character D, but it gets to the end of the message stream before finding it. I would find in your schema where you are expecting a D and see if the data looks different than your schema.

    Thanks,
    If this answers your question, please use the "Answer" button to say so | Ben Cline
    • Marked as answer by edhickey Monday, February 16, 2009 11:40 PM
    Saturday, February 7, 2009 2:17 AM
    Moderator
  • Did you create this schema using the Flat file wizard? What is in file position 9238?
    Monday, February 9, 2009 3:33 PM
  • This error is most often caused because you are a fixed-length flat file but your data is not of the correct length.


    Say you have record A with one element defined length 10 followed by record D with one element of length 10 (ignoring separators for the moment)

    A1234567890D1234567890

    The above is what the records should look like.

    But suppose your data is like this:

    A123456789D1234567890

    The parser will read record A as A with data 123456789D.  See how it has read the D as the tenth data character.  Now the parser is looking for the D that starts the second record but can't find it because it has already been read.

    Jim
    • Marked as answer by edhickey Monday, February 16, 2009 11:40 PM
    Monday, February 9, 2009 7:41 PM