i,
I have 2 files I need to join/merge to create records missing from the second file based on what's in the first file.
My experience to date of Joins etc hasn't included anything like this, so I'm not sure if it's even possible.
The file layouts are very much simplyfied here but the objective is the same:
Input File 1
Product1 Combination1
Product1 Combination2
Product1 Combination3
Product2 Combination1
Product2 Combination2
Input File 2
Product1 Dealer1 Combination1
Product1 Dealer1 Combination2
Product1 Dealer1 Combination3
Product1 Dealer2 Combination1
Product1 Dealer2 Combination3
Product1 Dealer3 Combination3
Product2 Dealer1 Combination1
Product2 Dealer2 Combination2
Product2 Dealer3 Combination1
I need to create a version of file 2 that has an occurrence of each combination per dealer per product. i.e. the output should look like :
Product1 Dealer1 Combination1
Product1 Dealer1 Combination2
Product1 Dealer1 Combination3
Product1 Dealer2 Combination1
Product1 Dealer2 Combination2
Product1 Dealer2 Combination3
Product1 Dealer3 Combination1
Product1 Dealer3 Combination2
Product1 Dealer3 Combination3
Product2 Dealer1 Combination1
Product2 Dealer1 Combination2
Product2 Dealer2 Combination1
Product2 Dealer2 Combination2
Product2 Dealer3 Combination1
Product2 Dealer3 Combination2
I am thinking I would need input file 2 sorted as above, by product, dealer then combination. But then a join on Product and combination would not work correctly. I haven't yet used GROUPs, is somethign like that needed here?
Or is what I want even possible? If it takes more than 1 step, that would be fine. SYNCSORT FOR Z/OS 1.3.2.2R in use.
Many thanks in advance.