You can only have one SORT statement per DFSORT run. Your first SORT statement is used and your second SORT statement is ignored.
SORT is processed before OUTFIL, so your records are sorted by 11,2,PD0,A and then those sorted records are processed by your three OUTFIL statements.
It's required that this file gives me the o/p after omitting records from & then sorting the i/p file.
If you want to omit records before sorting, then you have to use an OMIT statement, not an OMIT operand on OUTFIL. The OMIT statement is processed before the SORT statement. OUTFIL (and OUTFIL OMIT) is processed after the SORT statement. Note that an OMIT statement would affect all of the OUTFIL output files.
See this Figure which shows the order of processing of the DFSORT control statements and options:
Since I need the same i/p file to be sorted in two different ways, I guess going for two different steps is my only option.
Actually I initially had two separate steps but since my input file has got huge data, it was throwing up performance issues. That's why I wanted to work around it using an existing sort step which has the same file as input.
Anyway I'll get back in case I have any further queries. Thank you!!