![Wink ;)](./images/smilies/icon_wink.gif)
I just started to code my first map in X12. The output - simple delimited file with one header H and multiple M details. I need to be able to count all detail lines, that follow each header H record.
Simply to say:
H
M,,,,,,,1
M,,,,,,,2
M,,,,,,,3
M,,,,,,,4 etc...
H
M,,,,,,,,1
M,,,,,,,,2
M,,,,,,,,3
M,,,,,,,,4 etc...
I get the numbers using GETANDSET, but unfortunately, I don't know how to initialize the index after each H record. The ouput that I get looks like this:
H
M,,,,,,,1
M,,,,,,,2
M,,,,,,,3
M,,,,,,,4 etc...
H
M,,,,,,,,5
M,,,,,,,,6
M,,,,,,,,7
M,,,,,,,,8 etc...
I appreciate all your help!!!