Hi,
It is possible through jcl. For example if the input file contains 80 record length then
In sort, INREC=(1:1,80,81:SEQNUM,6,ZD),SORT FIELDS=(81,6,ZD,D),OUTREC=(1:1,80)
1) Using inrec we need to generate the sequential number starts from position 81.
For example
1) First 1-80 bytes contains the actual record and from position 81 we need to generate sequential
number using inrec i.e 000100, 000200 upto 50 records.
2) After generating all those numbers, sort we takes place in descending order.
3) Using outrec we have to move the first 80 bytes to the output file.
After doing this sort in first step in jcl, you can read the output file in second step
Thanks
Karthikkumar.P