I have a flat file. The file has a header, trailer and some detail records.
The header and trailer has characters 706 in the first 3 positions and the detail records have 706 in the 3rd, 4th and 5th position. I want to replace this 706 with 047 in all of them - header, trailer and detail records.
Is there any other way to do this other than splitting the file into 3 workfiles - one having only the header, one having only the trailer and 3rd having all the detail records and then use OUTREC and CHANGE of SORT utility and again merge these to a single file. If yes, could someone provide me the sort card to do this in a single step.
You can do this using the FINDREP feature of SyncSort if you have the latest release of Syncsort. Post here the sort product release info available in your SYSOUT. And what about your input RECFM,LRECL?