|
[EDI-L Mailing List Archive Home]
[Message List]
[Reply To This Message]
Re: Cleo 3780 & Sterling

Quoted text is from
< by Alex
Short <
>With their test file, it seems to end lines whenever it pleases, where
>ISA may have a line break that cuts it in two and everything after half
>of the time is after the line break. I do various reports on these raw
>files that requires at least some consistancy, be it a seperator such
>as ~, or a line break between ISA and GS header, but not lien break mid
>ISA header!
Linefeed and tilde are both common, and valid, segment terminators in
X12. In the good old (bad old?) days it was also quite common to receive
interchanges that had been blocked to fixed record length (often 80
bytes with a linefeed as a record separator). The practical man's first
reaction was to filter out CR/LF from the data stream. This worked quite
well for EDIFACT and TDI, since although linefeed could be used in
principle as a segment terminator, it never was.
The thinking man, a tedious pedant, then cut in and said that this was
not satisfactory. You have to be able to obey the small print of the
standards. The filtering became more complex. For EDIFACT and TDI the
initial UNA/SCH tells you if the segment terminator is linefeed, in
which case you turn off the filtering for the rest of the interchange.
For X12 you turn it on until the ISA is almost parsed; at which point
you leave it on if the segment terminator is other than linefeed, and
turn it off otherwise.
You will immediately spot that this goes pear-shaped if you get a
blocked interchange which also has linefeed (i.e. the record delimiter)
used as a segment delimiter. Handling this situation was beyond the wit
of the poor hacks at EDIMatrix. We might just have coped with it if the
interchange was using fixed blocking, but then email as a transfer
method came along and the linefeeds could appear almost anywhere.
Advanced heuristics would have been required. We don't do advanced
heuristics on our salaries :-(
The bottom line is that if using a transmission method which blocks or
word-wraps the EDI - avoid linefeed as a segment terminator. If on the
receiving end then delegate the task immediately, preferably to someone
without a family to support.
Regards
Chris
--
Chris Johnson home: +44 (0)20 8501 1490
EDIMatrix Ltd work: 0845 126 0680 or +44 20 8559 2454
fax: +44 (0)20 8559 2497
http://www.edimatrix.co.uk
|
|
Subscribe in XML format
| RSS 2.0 |
|
| Atom 0.3 |
|
|