> -----Original Message----- > From: IBM Mainframe Discussion List On Behalf Of John McKown > > [ snip ] > . . .. Take a case in point. A programmer has two VSAM KSDS > files. He is reading one file sequentially and wants to see in the second > file has as associated record in it (both files are keyed identically). How > to do that? I will grant that in the past, this was a "no brainer". However, > this "normal" (perhaps sub-normal?) programmer did it the "easy" way. He > read the first file sequentially. Then, for each record read, he did a keyed > read of the second file. The second file contained about 5% of the number of > records in the first file. So 95% of the time, the keyed read got a "record > not found" and, as a plus, ended up with its buffers flushed and positioning > lost. > > Of course the correct way to do this is to read each file sequentially in > parallel (they are in the same order due to using the "same" key values), > doing a "match merge" type operation. But that mindset seems, at least > around here, to have disappeared. I did the "match merge" code to show how > to do it (with a dramatic reduction in CPU and elapsed time). The programmer > considered __that__ to be "too advanced" and "obscure".
IBM already provides a program to do exactly that: ICETOOL. Syncsort provides a similar program. Don't know about CA-Sort. Why bother to reinvent that wheel? -jc- ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html