I need to sort a file based on certail fields and reformat them based on certain fields also. Reformatting can be possible using IFTHEN and BUILD functions, but can get them sorted along with this based on some fields. Can you provide some examples.
Well, first YOU have to provide some examples so I can understand what you want to do exactly. Please show an example of your input records and what you want for output. Tell me the starting position, length and format of the relevant fields. Tell me the RECFM and LRECL of the input file.