Thank you for reading this.
I am trying to assign a sequence number for each group and then restart for the next group. Here's my data
Input
L|19500|19500053423|AAAAAAAAAAAAAAA|08/27/2009|001|
L|19500|19500053423|CCCCCCCCCCCCCCC|08/27/2009|002|
L|19500|19500128631|AAAAAAAAAAAAAAA|10/27/2010|003|
L|19500|19500128631|AAAAAAAAAAAAAAA|10/27/2010|003|
L|19500|19500128631|CCCCCCCCCCCCCCC|10/27/2010|004|
L|19500|19500128651|AAAAAAAAAAAAAAA|10/27/2010|005|
L|19500|19500128651|CCCCCCCCCCCCCCC|10/27/2010|006|
L|19500|19500128652|AAAAAAAAAAAAAAA|11/01/2012|007|
L|19500|19500128652|AAAAAAAAAAAAAAA|11/01/2012|007|
L|19500|19500128652|CCCCCCCCCCCCCCC|11/01/2012|008|
Last 3 digits are what I was able to get as a sequence. My syncsort card is creating sequence for each group and doing it right, however I am not able to restart the sequence for each group.
Desired output
L|19500|19500053423|AAAAAAAAAAAAAAA|08/27/2009|001|
L|19500|19500053423|CCCCCCCCCCCCCCC|08/27/2009|002|
L|19500|19500128631|AAAAAAAAAAAAAAA|10/27/2010|001|
L|19500|19500128631|AAAAAAAAAAAAAAA|10/27/2010|001|
L|19500|19500128631|CCCCCCCCCCCCCCC|10/27/2010|002|
L|19500|19500128651|AAAAAAAAAAAAAAA|10/27/2010|001|
L|19500|19500128651|CCCCCCCCCCCCCCC|10/27/2010|002|
L|19500|19500128652|AAAAAAAAAAAAAAA|11/01/2012|001|
L|19500|19500128652|AAAAAAAAAAAAAAA|11/01/2012|001|
L|19500|19500128652|CCCCCCCCCCCCCCC|11/01/2012|002|
Syncsort Card:
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=INIT,OVERLAY=(572:SEQNUM,3,ZD,RESTART=(09,27))),
IFTHEN=(WHEN=GROUP,BEGIN=(572,3,ZD,EQ,1),PUSH=(48:ID=3))
OUTFIL FILES=01,
OUTREC=(1,574)
Input File Length is 571.
Any help on how to restart the sequence for each group is greatly appreciated.
Thank you.