If the records are already in sorted order as shown, then you could do a merge instead of a sort (change SORTIN to SORTIN01 and change SORT to MERGE).
Thanks for that answer Frank.
But when I try to write this to a sortout file which has double the recordlength of the input file its abending with this info:
1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 18:41 ON WED DEC 21, 200
0 RECORD TYPE IS F - DATA STARTS IN POSITION 1
0 5 BYTE FIXED RECORD LENGTH IS NOT EQUAL TO 7 BYTE LRECL FOR SORTOUT
0 C5-K05352 C6-Q95214 C7-K90000 C8-K05352 E9-K06751 E7-K90000
3 END OF DFSORT
Here I have a input file of length 5. And I need to write the ouput to a file of record length 7.
Also what shud I do to write only those records whose count exceeds certain limit only. Like
I need an output file with only those records whose count is equal to 3. So my output file shud be like
It would really help if you gave all the information needed for somebody to figure out what you want to do in your first post. You showed an example of your input records and what you wanted for output. I showed you how to do that. Now you're telling me you want this and this and ... It's very hard to hit a moving target. In the future, please try to give all of the information needed in your first post.
If your input file has LRECL=5 and you want the output file to have LRECL=7, change the OUTFIL statement to:
Thanks for all your help. My problem got resolved by using the second method you provided me. Again, now I am stuck with a different problem.
Here I have multiple input files having the same format and I need a single output file having the same format as that of input file having only those records present all the different input file.