I'm trying to match-merge 2 input files based on a key. I want to create an output file with a record for every key from input1 plus all records with a match key from input2. I haven't found a specific example in the books so I'm asking for help.

What I have:

//input1 dd *
key1 blah
key2 blah
//input2 dd*
key1 data-x
key1 data-y
key1 data-z
key2 data-m
key2 data-n
key2 data-o

What I wish to have, an output record per key from input1 times each key value found from input2 :

key1 blah data-x
key1 blah data-y
key1 blah data-z
key2 blah data-m
key2 blah data-n
key2 blah data-o

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