> ... DFSORT is invoked 1000's of times by the program ...

Once upon a time, at a previous job, I ran into a similar situation. The job
ran for hours and hours. Analysis showed that SORT was invoked to sort 1
record (yes, that's ONE record!) most of the time and between 2 and about
100 records the rest of the time. A programmer had tried to cobble something
together, quick-and-dirty-like, and overlooked the fact that his approach
would require several thousands of SORT invocations. 
SORT invocations take time, especially DYNALLOC, and there's no way (that I
know of) around it.
You may be able reduce the overhead a bit by adding a 
//DFSPARM DD *
 OPTION DYNALLOC=(3390,2)
to the JCL, as recommended earlier. 
The programmer eventually changed the program logic to output all the
records to be sorted to a file, then called SORT and finally processed all
sorted records ... the job now ran in under 5 minutes.

So, my question to the original poster is: Is it really necessary to invoke
SORT thousands of times or could the program logic be changed to avoid or
reduce the number of SORT invocations?


Regards,
Ulrich Krueger

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to