|
[EDI-L Mailing List Archive Home]
[Message List]
[Reply To This Message]
RE: Cleo 3780 & Sterling
Parsing this involves counting bytes and deciding, when you encounter a line
break, is it a "real" one, i.e. a segment terminator, or a "false" one,
inserted to break up the byte stream into 80 byte blocks. Did you change
the line lengths below when you replaced your id and qualifier with MYID and
HI? If I substitute MYID123456 for MYID in your example:
ISA*00* *00* *ZZ*LYOUNGTEST *HI*MYID123456
*020709*104
(80 bytes then a false break)
8*U*00200*000000001*0*P*>
(26 bytes including real break)
GS*PO*LYOUNGTEST*MYID123456*020709*1048*2*X*003020
(51 bytes including a real break)
ST*
(3 bytes then a false break, 26 + 51 + 3 = 80)
850*0002
(9 bytes including a real break)
BEG*00*NE*101*1001*911221*0001*AC
You recognize false breaks because they come after every 80 bytes, real
breaks are part of the transmitted data and so count as part of the 80. If
you ever find two consecutive breaks, treat it as a real break and reset
your counter.
Howard Parks
1 Peter 4:10
|
|
Subscribe in XML format
| RSS 2.0 |
|
| Atom 0.3 |
|
|