Staffan, I'm still thinking about ways to eliminate the multiple SORTs ... there should be a way to achieve this, but, not having the full details about your program, I might me totally off base.
So, my thinking is: If you currently sort by fields A, B, C in each SORT invocation ... Wouldn't adding a sequence number to the records solve the problem? For example, all records belonging to SORT #1 have SEQNUM=1, all records for SORT #2 have SEQNUM=2, etc., incrementing SEQNUM by 1 for what is now each individual SORT. When all records have been generated, run one SORT and sort by SEQNUM, A, B, C. Now process the output in groups by SEQNUM. Hot, warm, cold, not even close? How am I doing? Regards, Ulrich Krueger -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Staffan Tylen Sent: Wednesday, February 22, 2012 1:12 AM To: [email protected] Subject: Re: Avoiding DFSORT dynamic allocatoin, was: Abend S0C4 in an internal sort Yes, unfortunately, because the records are dynamically created and could not be put in a single file for a one-time sort. Why should life be simple? :) I still find it strange that there is no way to prevent dynamic allocation 100%, even though the documentation hints about ways to do so, for example DYNALLOC=OFF,FILESZ=U0,DSPSIZE=0. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN

