I have input file and sorting it on two fields with sum fields = none. In input file I have detail record and trailer
record. Trailer record contains total number of detail records that we have in input file. While sorting with
sum fields = none it's deleting dulicate records from that file. Suppose there 50 records and 5 duplicate records are
deleted then remaining are 45 records, so Trailer record should contain value 45 but it's not getting updated in output
file. Please tell me what sort should I use to update the trailer record as per my requirement.
NOTE - TYPE OF RECORD 2 IS FOR DETAIL AND 3 IS FOR TRAILER.
Hi, i tried to use this code for a file i have got. The only problem is that i have got a header record as well, so the count in the trailer is 1 more than it should be. I tried using a criteria which includes only detail records for the seqnum, but then the final overlay is writing spaces to the trailer count field since the seqnum field of the trailer record is empty. i.e
The detail records start with a '1' in first field, and the trailer starts with '9'. Header starts with '0'. Here the count will be calulcated correctly. But in the second overlay, since the 61st to 68th positions in the trailer recods is spaces, the count field of the trailer record is re-written with spaces. Any suggestions on how to work around this?
Hi, i tried that and there is a change, but not expected. My trailer value was coming as:
72 was the earlier trailer count. So tried increasing the number of 'T's in the EDIT from 6 to 8. I am getting the desired output now. If that is not the way to go about it, please do let me know. Thanks alot for your help.