This project has moved and is read-only. For the latest updates, please go here.

P is not a valid subelement in position 105

Nov 27, 2012 at 7:41 PM

I am running 2.3.1 and unfortunately cannot get it to process my (admittedly huge) EDI file.

I receive the following message:

<tt>C:\EDI\Release>X12Parser.exe ..\incoming.txt</tt>

<tt>Unhandled Exception: System.ArgumentException: P is not a valid subelement separator in position 105 of the file.
   at OopFactory.X12.Parsing.X12DelimiterSet..ctor(Char[] isaSegmentAndTerminator)
   at OopFactory.X12.Parsing.X12StreamReader..ctor(Stream stream, Encoding encoding)
   at OopFactory.X12.Parsing.X12Parser.ParseMultiple(Stream stream, Encoding encoding)
   at OopFactory.X12.X12Parser.Program.Main(String[] args)</tt>

I have read the previous discussion in which ISA08 was not fully populated and the wrong separator was thus being selected. My file is correctly formed; ISA08 contains 15 characters. The file in question passes validation and my EDI viewer loads it correctly.

Here is the header (NPI set to 9s):

ISA*00*          *00*          *ZZ*610442         *ZZ*9999999999     *121121*021
2*|*00501*000000021*0*P*>~

 Anyone have any suggestions on what I might try next?

 

Nov 28, 2012 at 8:28 AM

Fixed by stripping 0D 0A. Got some nice XML, thanks for this project.