I can think of one POSSIBLE difference. If you have compiled with FASTSRT compiler option (which I recommend that people ALWAYS use), then to get the DL/I input you must be using an INPUT procedure. This puts this part (not the OUTPUT part) into "native" COBOL (not FASTSRT) mode.
OTOH, when you use the "flat file" as input, then (assuming no INPUT PROCEDURE) the entire SORT is done via FASTSRT. The difference seems extreme for this, but it MIGHT be at least part of the problem. If you are using a SORT USING to handle the flat file input, try doing it via an input procedure (with OPEN, READ, CLOSE) and see how that compares to the original DL/I version. "GAVIN Darren * OPS EAS" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Does anyone know why when an Internal Sort is performed while a program > also accessing a DLI Database That the amount of I/O against DLI > increases by a few orders of magnitude? > > > > I had a program extracting data off a DLI Database inside a Sort Input > phase. It was extracting only 181 records form 60,000 DLI Segments, but > taking over 800,000K EXCP I/O and 10 minutes. > > > > When I instead just wrote the Sort Record to a Flat file and Eliminated > the sort completely, It extract the same records, but only took 11,000 > EXCP I/O and about 5 seconds. > > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html