Examples of Wrapped and Folded Data
When viewing a test data file with a text editor (e.g., Notepad), the data may appear to be wrapped when it isn't. Check the text editor setting for Edit | Word Wrap.
Unwrapped and Unfolded EDI Data
Each line contains exactly one segment.
ISA*00* *00* *01*9012345720000 *01*9088877320000 *030212 … GS*HC*901234572000*908887732000*20030212*1615*386*X*004010X096A1~ ST*837*0386~ BHT*0019*00*3920394930203*20030212*1615*CH~ REF*87*004010X096A1~ NM1*41*1*JOHNSON*BARBARA*T***46*9012345918341~ PER*IC*ARTHUR JONES*ED*123456785~ NM1*40*2*SMITH*****46*9012345918341~
Wrapped Data
Data is all on one line with no CR/LF. When viewed with a text editor (e.g., Notepad), it may appear to be broken into fixed lengths when it is not. There is no line break anywhere in the data.
ISA*00* *00* *01*9012345720000 *01*9088877320000*030212*0848*U*00401*000000386*0* T*:~ G S*HC*901234572000*9088877 32000*20030212*1615*386*X*004010X096A1~ST*837*0386~BH T*0019*00*3920394930203*200302 12*1615*CH~REF*87*004010X096A1~NM1*41*1*JOHNSON* BARBARA*T***46*9012345918341~PER*IC*ARTHUR
Folded EDI Data
Existing CR/LFs are left alone, but additional ones are added for lines longer than n characters. This example is folded at 80 characters. Notice that existing CR/LFs are left alone but additional ones are added for lines longer than 80 characters, such as the ISA.
ISA*00* *00* *01*9012345720000 *01*9088877320000 *030212*084 8*U*00401*000000386*0*T*:! GS*HC*901234572000*908887732000*20030212*1615*386*X*004010X096A1! ST*837*0386! BHT*0019*00*3920394930203*20030212*1615*CH!
Wrapped and Folded Data
Existing CR/LFs are removed so the data is all on one line. Then, every n characters, a CR/LF is added to break the data into fixed line lengths. This example is broken into 80-byte lines:
ISA*00* *00* *01*9012345720000 *01*9088877320000 *030212*084 8*U*00401*000000386*0*T*:!GS*HC*901234572000*908887732000*20030212*1615*386*X*00 4010X096A1!ST*837*0386!BHT*0019*00*3920394930203*20030212*1615*CH!REF*87*004010X 096A1!NM1*41*1*JOHNSON*BARBARA*T***46*9012345918341!PER*IC*ARTHUR JONES*ED*12345 6785!NM1*40*2*SMITH*****46*9012345918341!HL*1**20*1!PRV*BI*ZZ*103TF0200X!CUR*85*