Page 1 of 1

compare two files and output a difference report

PostPosted: Tue Jul 08, 2008 7:05 pm
by kihaho
I have 2 files that contain duplicate records.
I'd like to create a new file that contains only single records.
Is there any way to acomplish this?
Thank you!!

Re: compare two files and output a difference report

PostPosted: Tue Jul 08, 2008 9:37 pm
by dick scherrer
Hello,

Is there any way to acomplish this?
Yes, but you need to post something that demonstrates your requirement. Post some sample input from both files and the output you want when that sample input is processed.

Re: compare two files and output a difference report

PostPosted: Wed Jul 09, 2008 7:24 pm
by kihaho
Hi Dick,
Thank you for your reply.
I found a tool to accomplish the above - It's called "Beyond Compare".
Basically, I uploaded the flat files to the hard drive as a text format and ran them through the "Beyond Compare". By selecting "just matching" option gave me the list of the duplicate records. From that list, I've deleted the duplicate records from one of the two original files.
Thank you anyways though!!

Re: compare two files and output a difference report

PostPosted: Wed Jul 09, 2008 9:35 pm
by dick scherrer
You're welcome - good to hear you have a solution :)

As long as the data is small enough to transfer to your local drive, this may suffice.

If you work with larger volumes, you will most likely not be able to use this approach and it would be well to already know how to do the work on the platform where the data resides. . . FWIW.

Re: compare two files and output a difference report

PostPosted: Sat Jul 12, 2008 6:01 pm
by jayind
Hi kihaho,

suggestion: using JCL, merge the files. During merge process, eliminate duplicates (using SUM FIELDS=NONE, hope i am correct in syntax ;) )