Invoking gawk as
follows:
gawk --re-interval -f \dos\gawk-bug.awk 4010_segments.txt >
gawk_bug.txt
produces
repeatable errors.
First
instance:
<xs:complexType name="sxC2">
<xs:sequence>
00 104 110|00 1|4
|10
<xs:element name="C200 1" type="dx004 "
minOccurs="0" otl:name=""/>
Second
instance:
<xs:complexType
name="sxE30">
<xs:sequence>
16 Code List Reference AN
1|16 C|de List|Reference
<xs:element name="E3016
C" type="dxList" minOccurs="0" otl:name=""/>
Third
instance:
<xs:complexType name="sxSV1">
<xs:sequence>
10 1340 Multiple Procedu|10 1340
Mult|ple Pro|edu
<xs:element name="SV110 1340 Mult"
type="dx Pro" minOccurs="0" otl:name=""/>
Reviewing the gawk
code, the program produces XML (those beginning with "<") with
"<xs:element" lines prededed by printing $0, $1, $2, and $3 separated by
vertical bars.
Reviewing the
source file, 4010_segments.txt, will show that the errant lines actually
appear some 8-10 lines _further_ into the file than the lines printed
immediately thereafter. Very anomalous behavior.
Richard Patchet
A4 Networks
101 W McDermott Dr
Allen, TX 75013
214.547.8020