I have a file which has two type of records. I need to remove the 1st and the 8th character of the detail record of the first record type and write the rest of the records into the output file along with the modified records into the output file. The order in which the records apper should not change as it is very important. The file is of LRECL 35 and FB. The sample records are as follows.
0000000100907022011000 0 ----------> Header record of the first type of record (No change required)
01621041500295000020000 ----------> Detail record which requires the truncation (Change required)
03298701500200000030003 ----------> Detail record which requires the truncation (Change required)
999999900000000000000 ----------> Trailer record of the first type of record (No change required)
00 0100907022011000000000000000000 ----------> Header record of the second type of record (No change required)
T01 5000002000000000005900000000000 ----------> Detail record of the second type of record (No change required)
T04 5000008000003000135000000006000 ----------> Detail record of the second type of record (No change required)
Z99Z9000000000000000000000000000000 ---------->Trailer record of the second type of record (No change required)
Thanks you very much for your help.