I have a SORT pgm which runs for cloase to 4 hours. This sort splits the file into 2 based on Year (> 2006 and < 2006) . The record length for i/p and o/p are 1500.
Total number of records processed is around 2.4 million
Do you need the complete sorted file in SORTOUT? If not, why do you have OUTFIL FILES=OUT? This requires extra writes. If you don't need the complete sorted file in SORTOUT, remove the OUTFIL FILES=OUT statement.
The sort on the first line is required before spliting the file . I wonder if this statement is causing the step to run longer.
If you are asking whether doing a SORT without the OUTFILs and then a COPY with the OUTFILs would be faster than doing a SORT with the OUTFILs, the only way to know is to try it both ways and compare.
If you are using DFSORT (ICE messages) and you want more help on this, add the following to the job:
//SORTDIAG DD DUMMY
then rerun it and send the complete JES messages to David Betten (email@example.com) and ask him if there's anything he sees that could be tuned (Dave is the DFSORT Performance Team Leader).
Irrespective of what u r using DFSORT or SYNCSORT, removing OUTFIL FILES=OUT will enhance your job performance as mentioned by Frank. Not sure whether you require the entire input file to be sorted and written in SORTOUT. If not..better remove that statement. The way I see, it is contributing much in the job run-time.