Hi kclark747,
Usually, a HL segment starts, I mean, its first element, is a unique, normally sequencial number, starting with 1, then when you are mapping a subordinated HL segment you normally map the Id number the HL segment above (parent) has, like a tree.
...
HL*1*0*S
...
HL*2*1*O
...
HL*3*2*I
...
HL*4*2*I
...
HL*5*2*I
...
HL*6*2*I
...
HL*7*2*I
...
here we have a Shipment level, then an Order level, and multiple Item levels, below O (order), the parent ID stills the same, and the Id will remain incremented by one, it must keep unique. But if you have a second O level your Parent Id will be the same.
In a tree structure you'll see
HL*1*0*S
+HL*2*1*O
+HL*3*2*I
+HL*4*2*I
+HL*5*2*I
+HL*6*2*I
+HL*7*2*I
+HL*8*1*0
....
Hope this helps
pontec