I need to update the one of the trailer in the File which has record length of 220 and record format is FB. File has six headers and six trailers and in fifth header I want to remove the data then I need to update the trailer count which should be equal to the remaining record count of the record of the data in fifth header. My trailer is identify by key word TRAILER start at 1 position and count is comp-3 variable length S9 (9) COMP-3.
INPUT FILE :
HEADER
2009FI0KA E TDA73860
2009FI0KA E TDA75167
2009FI0KA G FC18
2009FI0KA K 2SA1576A
2009PP0FJ000040700000000077
2009PP0FJ000040700000000080
2009PP0FJ000040814000000069
2009PP0FJ000040814000000069
TRAILER..... ============> TRAILER COUNT IS 8
OUTPUT FILE:
HEADER
2009PP0FJ000040700000000077
2009PP0FJ000040700000000080
2009PP0FJ000040814000000069
2009PP0FJ000040814000000069
TRAILER..... ============> TRAILER COUNT SHOULD BE 4
Thanks
Bodhi