On 05/04/2016 01:20 AM, Tom Marchant wrote:
On Mon, 4 Apr 2016 16:45:37 +1000, Andrew Rowley wrote:

A Hashmap potentially allows you to read sequentially and match records
between files, without caring about the order.
Can you please explain what you mean by this? Are you talking about using
the hashmap to determine which record to read next, and so to read the
records in an order that is logically sequential, but physically random? If so,
that is not at all like reading the records sequentially.


If one file fits in memory, you can read it sequentially into a Hashmap with the using the data you want to match as the key. Then read the second one, also sequentially, retrieving matching records from the Hashmap by key. You can also remove them from the Hashmap as they are found if you need to know if any are unmatched.

But this is a solution for a made up case - I don't know whether it is a common situation. I was interested in hearing real reasons why sort is so common on z/OS i.e. Why sort?

On Hashmaps etc. in general - they are the memory equivalent to indexed datasets (VSAM etc) versus sequential datasets. Their availability opens up many new ways to process data - and algorithm changes are often where the big savings can be made.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to