I would like to be able to use DFSORT to overlay a sequence number on every record in a file but so that the sequence only increments every 100 records. There are no obvious key fields that can be used to denote each 100th record however there is already a sequence number on the file that follows this rule - so effectively I just need to 'renumber' the file.
The example below shows what I require however I have modified it to show the sequence number changing every 5 records to keep the example simple.
E.g input file
4529123 00000047
3212321 00000047
3920192 00000047
1293940 00000047
2093029 00000047
1929303 00000052
1939482 00000052
1928392 00000052
1288333 00000052
AB2123L 00000052
S1S4444 00000023
3939191 00000023
41AS020 00000023
3020202 00000023
3983929 00000023
3212321 00000047
3920192 00000047
1293940 00000047
2093029 00000047
1929303 00000052
1939482 00000052
1928392 00000052
1288333 00000052
AB2123L 00000052
S1S4444 00000023
3939191 00000023
41AS020 00000023
3020202 00000023
3983929 00000023
The desired output based on the above input file would be:
4529123 00000001
3212321 00000001
3920192 00000001
1293940 00000001
2093029 00000001
1929303 00000002
1939482 00000002
1928392 00000002
1288333 00000002
AB2123L 00000002
S1S4444 00000003
3939191 00000003
41AS020 00000003
3020202 00000003
3983929 00000003
3212321 00000001
3920192 00000001
1293940 00000001
2093029 00000001
1929303 00000002
1939482 00000002
1928392 00000002
1288333 00000002
AB2123L 00000002
S1S4444 00000003
3939191 00000003
41AS020 00000003
3020202 00000003
3983929 00000003
Ideally I would like to be able to specify a starting value for the sequence number but it is not essential.
Many Thanks
Baz