Manju Venkat wrote:Also, the trailer has one more field (field13) for updating the total number of records present in the file (including the header and trailer).
Once you fix your problem with copying the data for the trailer, perhaps you'd like to have a crack at the record counts yourself. Have a look for words like "trailer" in the manual, see if you can find appropriate counts available then.
If you look at Kolusu's "signature", you'll see that he actually works for IBM on their DFSORT product. The software product you are using. He is not at all in the habit of providing solutions which do not work according to the information people provide. I did not expect to find an error in his code, and did not find one. I fully expect there is an error in your code, even though it has been given to you.