parsing - Reading EDI Formatted Files -


I'm new to EDI, and I have a question.

I've read that you can find out more about the EDI format by looking at the last 3 characters of the ISA line. It is fine that every EDI uses line breaks for different entities. Done, but I've found that many single line files are with the characters used as breakdowns. I have noticed that the last character parsed in every EDI is the brake character I have seen a few hundred, and there is no exception in it. If I catch that character for the first time, and use it to get the last 3 of the ISA line, then do I have a reasonable expectation that I will be able to parse the data from EDI?

I do not know that it helps, but EDI type '850, 875 in question. I'm not sure whether this is a standard or not, but it might be worth mentioning. The type of transaction EDI does not really make any difference (850 = order, 875 = grocery p)

You should be able to rely on trustworthy breadth on ISA (and only ISA) (105 characters as described in memory). After leaving the first 105 characters and before the first launch of "GS", your line terminator (this can be anything, contains 0x07 - beep - see if you are output to stdout for debugging or You can have a bunch of beep outside the speaker) Usually this is 1 or 2 characters, sometimes it can be more (if someone is sending you data then connects additional terminator for some reason). Once you have a line terminator, you can get the Segment (delimiter) delimiter. I usually draw 3 characters of the GS line and use it, although the fourth character of the ISA line should also work.

Be aware that you can get files with more than one ISA in it.

One more thing .. It is also possible (again, if its not convincing) is a variable length ISA for an ADI file, it is very rare, but I had to adjust it. If this happens then you have to parse the line in your areas. The final field in ISA is only one character, so you can determine the actual length of ISA from it. If it were mine, then I would not worry about it unless you see such a file. This is a rare opportunity.

What I have said above can not be for the letter of "Speak" ... That is, I am not sure that there are separate line separators in the same file, but in separate ISAs, but It is technically possible and I adjust it because I have to process those files that come in that way. ADI processor I use processes over 5000 files a day, which is with 3000 possible sources of data (so I see very strange stuff).

Best regards, Don

/ html>

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -