Coldplay,
Sigh. Didn't work how? If I run this DFSORT job:
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
1234567<JOE0015 >ABC
1234567<JOE0016 >ABC
1111111<JOE0015 >CDE
1234567<JOE0015A>XYZ
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(9,8,CH,EQ,C'JOE0015')
/*
SORTOUT, as expected, has:
1234567<JOE0015 >ABC
1111111<JOE0015 >CDE
So if it "won't work", there's something you're not telling us like:
1) Your input file is VB, not FB.
2) You want to look for 7 characters containing 'JOE0015' rather than 8 characters containing 'JOE0015 ' (trailing blank)
3) Something else
If you need more specific help, show an example of your input records, expected output records and your complete JES log for your run, and explain what you mean by "it didn't work".