You can use DFSORT's JOINKEYS to match files. Check this link which 
explains in detail about Matching files using Joinkeys

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA60/4.0?

Just make sure to pass the larger file as input to SORTJNF1 dd


Sri Hari Kolusu
DFSORT Development
IBM Corporation
Email: skol...@us.ibm.com
Phone: 408-463-2403 Tie Line 543-2403

IBM Mainframe Discussion List <IBM-MAIN@listserv.ua.edu> wrote on 
10/04/2012 04:47:52 PM:

> From: David Speake <david.spe...@bcbssc.com>
> To: IBM-MAIN@listserv.ua.edu, 
> Date: 10/04/2012 04:48 PM
> Subject: Design of Key Matching application
> Sent by: IBM Mainframe Discussion List <IBM-MAIN@listserv.ua.edu>
> 
> One of my application programmers asked for information on design 
decision.
> 
> Given two files that are not in order by the match key.
> Assuming the smaller file has at most one record per possible key value. 

> Larger file may have multiple records for some keys and may also have 
values 
> not found in the smaller file.
> Assume optimal blocking, buffering, both files, both solutions. 
> Which is more efficient?
> 
> Sort the smaller by that key, load to VSAM, then pass the unordered 
> larger file and
> do random retrievals from the VSAM file.
> 
> Sort both PS files by key in question and pass sorted files for 
> matching by key.
> 
> We both (sorta) think the answer is ... "It depends" but on what 
criteria?
> 
> Number of records in each file? Which is more important? And by how 
much?
> Record lengths? Same as above?
> Length of key field in question? (Within SORT and VSAM length 
> restrictions of course).
> Key bias in larger file?
> Ratio of hits/non hits?
> 
> Anyone have a nice formula?  :-)
> 
> David Speake
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> 

----------------------------------------------------------------------
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