I might be doing some crazy mistake, but I couldn't figure out what is causing this issue.
My input is a VB 904 file.
1. I've added SEQNUM of 9 ZD on column 5 of the VB file and eliminated certain detail records based on key matching with another filter file.
2. As a last step, I wanted to sort the file based on SEQNUM, update count on trailer record and get rid of SEQNUM I added. The issue here is the SEQNUM is getting removed on all but Trailer record.
Joined: 15 Aug 2015 Posts: 1231 Location: Bamberg, Germany
From the manual:The trailer record will NOT be treated as a data record, that is, no other OUTFIL processing will be performed against the trailer record.
Thanks for you replies. I used your suggestion and replaced 'n' with correct positions. I still see SEQNUM in Trailer record but COUNT has its correct value.
I also tried with different values for n (reduced n by 9 as SEQNUM is eliminated by BUILD). Here, SEQNUM is removed from Trailer but COUNT is not getting updated.
Joined: 15 Aug 2015 Posts: 1231 Location: Bamberg, Germany
I have to correct myself because it was looking good at first place. If the Trailer is identified as such, the SEQNUM can not be removed in OUTFIL using my suggested method. The quoted part from the manual stands correct.
What you can do instead (as I see you are not using OUTREC), put the BUILD=(1,4,14) in there and let the IFTRAIL do it's job in OUTFIL.