Flat Files - EdiMessage.IsValid() Over Record Format w/o Record Tag

Post author
Christopher Roedocker

I am encountering an error when attempting to invoke EdiMessage.IsValid() over a template built for a flat file format. I am receiving a “Can't find segment name for InstanceContext” error when the method is invoked.

The file format is a basic Pipe-Delimited file format, where all records in the same file have the same format. None of the fields in the file serve the role of a Record Tag/Identifier. Is it possible to validate flat file records where there is no sort of record tag/identifier?

Experimentation did show that modifying the template and file to include a record tag allowed for IsValid() to execute and provide the error context. As we are exploring working with legacy proprietary files, it is our preference to be able to validate the file format without modifying it.

Template Example w/o Segment Tag -- IsValid() throws Exception

FIELD1|FIELD2|FIELD3|ETC|ETC

Modified Template Adding Record Tag -- IsValid() Executes & Error Context Generated

REC|FIELD1|FIELD2|FIELD3|ETC|ETC

 

Comments

1 comment

  • Comment author
    Admin

    Hello,

    Thank you for reporting this. It's been identified as a bug and will be resolved in the next release.

    1

Please sign in to leave a comment.