Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Well, without knowing what your input records look like, I can't tell you whether you should expect 185 records or not.
Do either of the files have duplicate records? Remember that with duplicate records, you can get multiple paired records for one input record, for example:
Input file1
A
A
A
Input file2
A
A
A
A
Although input file1 has 3 records and input file2 has 4 records, the output will have 12 records (cartesian join).
If you want more than speculation, you'd need to show a small sample of of input records and expected output where you don't get the number of output records you expect, so I could tell you whether you're expecting the right number or not.
Well, without knowing what your input records look like, I can't tell you whether you should expect 185 records or not.
Do either of the files have duplicate records? Remember that with duplicate records, you can get multiple paired records for one input record, for example:
Input file1
A
A
A
Input file2
A
A
A
A
Although input file1 has 3 records and input file2 has 4 records, the output will have 12 records (cartesian join).
If you want more than speculation, you'd need to show a small sample of of input records and expected output where you don't get the number of output records you expect, so I could tell you whether you're expecting the right number or not.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Your example makes no sense. I can't figure out what you want.
For example, ABCP1234000 in file1 has no match in file2, but you show it in file3. You have multiple instances of ABCDxxx in both files, but I can't figure out what "rules" you're using to get the output records in these cases.
You need to do a much better job of explaining the "rules" for what you want to do with a good example before I can help you.
Your example makes no sense. I can't figure out what you want.
For example, ABCP1234000 in file1 has no match in file2, but you show it in file3. You have multiple instances of ABCDxxx in both files, but I can't figure out what "rules" you're using to get the output records in these cases.
You need to do a much better job of explaining the "rules" for what you want to do with a good example before I can help you.
Frank
Sorry for the confusion.
Here is the data and my requirement.
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
Binaya,
Looks like you want to perform a one-to-one match within the duplicates. If that is indeed true then the following DFSORT JCL will give you the desired results. I also assumed that your input is already sorted on the keys.