If you're not sure of the "rules", then it's difficult to tell you how to encode them in a DFSORT job.
However, conceptually you can just add a new field with the score multiplied by 10 for the numeric values, and values in between for the non-numeric values: 645 for ' P', 545 for 'W ' and -01 for ' F'. You can then sort on the id and subject ascending and the new field descending to get the records in the correct order. Finally, you can use OUTFIL with SECTIONS and HEADER3 to get the records you want. Here's a DFSORT job that shows how to do that:
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
INREC IFTHEN=(WHEN=(23,3,CH,EQ,C' P'),OVERLAY=(26:C'645')),