raghuvanshi,
If that's not working for you, then there's something you're not telling us. When I run this job with DFSORT:
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
31-01-2011
25-05-2012
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(4,2,C'/',1,2,C'/',7,4)
/*
I get this output which is what you seem to be expecting:
This assumes your input file has RECFM=FB and the dd-mm-yyyy date starts in position 1 - is that correct?
If this doesn't help, tell me the RECFM and LRECL of your input file, and show an example of your input records and expected output. Also, show me the JES log for your run with the all of messages you received.
BTW, you should NOT specify SORTWKdd DDs for a COPY as they aren't used and just waste space. Actually, it's better to never specify SORTWKdd DDs and let DFSORT dynamically allocation them when needed.