On 3/04/2016 2:50 PM, Andrew Rowley wrote:
On 02/04/2016 10:09 PM, David Crayford wrote:
IBM switched the magic bit to offload the JZOS JNI C/C++ workload to a zIIP so they could do the same for DFSORT. A well engineered library could handle the callbacks so the client just reads records like a normal API. That would certainly push Java batch up a notch.
One question that puzzles me (maybe it's my lack of an application programming background): Why is sort used so much on z/OS?


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 know you can then e.g. do grouping based on key changes, but is that really necessary in current programs? Is that the reason it is commonly used?

I generally use e.g. Java HashMap, C# Hashtable for grouping so the data doesn't need to be sorted. Do other common languages on z/OS provide similar functions? (C++ I know.) Are there opportunities to use programming language features to avoid sorts altogether?

Andrew Rowley

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

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

Reply via email to