Count the no. of records and update the trailer record
Posted: Thu Dec 13, 2012 3:18 pm
Hi All,
I have a file which contains header records , detail record and trailer record.15th position in the file contains 'A' for header record , 'L' for trailer record and 'M','V' or 'P' for detail records.
Now my requirement is to count the no. of records based up on 'M' ,'V' and 'P'( which is on 15th position) and update these counts on the trailer record.
My trailer record looks some thing like this
OT08LV12122012L8 00003400000000003200000000000000000000000000000200000
total four counts will be there in the triler record the first one from position 19 to 24 is the count of total no. of records i.e (count of 'M' + 'V' + 'P' records) and from position 31 to 36 is the count of 'V' records and from position 37 to 42 is the count of 'P' records and the last one from positon 61 to 66 is the count of 'M' records.
Please help me how can we acheive this using DFSORT or ICETOOL.
Thanks in advance !!!
I have a file which contains header records , detail record and trailer record.15th position in the file contains 'A' for header record , 'L' for trailer record and 'M','V' or 'P' for detail records.
Now my requirement is to count the no. of records based up on 'M' ,'V' and 'P'( which is on 15th position) and update these counts on the trailer record.
My trailer record looks some thing like this
OT08LV12122012L8 00003400000000003200000000000000000000000000000200000
total four counts will be there in the triler record the first one from position 19 to 24 is the count of total no. of records i.e (count of 'M' + 'V' + 'P' records) and from position 31 to 36 is the count of 'V' records and from position 37 to 42 is the count of 'P' records and the last one from positon 61 to 66 is the count of 'M' records.
Please help me how can we acheive this using DFSORT or ICETOOL.
Thanks in advance !!!