I have a flat file with fixed length of 778 byte. And there are certain types of records like 'A1', 'F1', 'C1', 'G1', 'M1', 'M2' etc. starting with 1st byte; with 2 variants like '20' & '30' ( from 5th byte say ).
But I need to sort the file with certain keys among which one of the keys(with 9 bytes) position is different in different types of record.
Here I tried but the code doesn't work out..i am trying to Push the field's value from different position in the last byte & trying to sort afterwards.
Well, along with IFOUTLEN, you removed INREC, so you don't have a valid control statement. You need INREC:
If you want more help on this, you need to explain in more detail what it is exactly you're trying to do. Show an example of the records in your input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input file. If the input file can have duplicates within it, show that in your example.