I am trying to compare two files using a key and write paired records into the output file.
I am getting difference in the output file count everytime I change the reformat clause.
I have a month and year in file 1 (ex: 201805) and some transactions done everyday with the timestamp in file 2. I am matching both the files to get all the transactions done on this month of the year. but I am getting different output counts with change in reformat clause.
case1:
Input:
file 1: 1 record
file 2: 500000 records
sortcard:
output: 898946 records
It would be of great help if someone can explain why there is huge difference in the counts and how the reformat clause exactly works.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Are you sure, you are running with the same inputs on both cases?
AFAIK REFORMAT should not change the output record counts. It would just select which fields to pass to the output from the JOINed record. Can you post the SYSOUTs from both the runs?
Before asking for help from the forum (and not giving detailed essential information!!!), try to do carefully the following steps.
Re-run your test with minimal size of the second file. Not 50,000 but 5-10 records. Print or view carefully ALL input files, and ALL output files, for BOTH of your cases.
If there is still difference in output count, then find out yourself: which records exactly are different, and what may cause that behavior?
* * *
The information you presented GIVES NO CHANCE FOR ANYONE TO BE ABLE TO HELP YOU doing YOUR OWN job instead of YOURSELF. In short terms your question looks like this:
Quote:
I do everything right, but my result is wrong. Where is my error?