On 3/04/2016 22:43, David Crayford wrote:
Good question! Sort can be utilised for other purposes than sorting, it can be used as an I/O engine. DFSORT (or Syncsort) implements bespoke highly optinized I/O using low-level programming interfaces such as chained EXCPs which are significantly faster than using standard access methods like QSAM or BSAM, including overlapping BSAM I/O. DFSORT has exit routines (callbacks) which get called for each record. Basically it's supercharged I/O. One of our products does just that as do many others. IIRC, IBM FileManager uses sort for I/O. The trouble with using this technique with Java is the JNI/callback overhead.

I'm aware of the efficient I/O, but I'm more interested in the use to put data into a particular order. My own programs I never sort input data, frequently sort small subsets of data during processing (likely always too small quantities for something like DFSORT) and almost always sort for presentation. Presentation is hopefully also too small quantities for DFSORT.

It is an interesting idea though to use it to read data via the exits without actually giving it back to DFSORT to process.

--
Andrew Rowley
Black Hill Software
+61 413 302 386

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

Reply via email to