Posted: Wed Nov 05, 2008 11:51 am Post subject: Comparing two files and write non-matching records
Hi,
I have 2 files. I want to compare them by using a key and if the records are present in either file2 ,then I want to write those records to an output file. Key is from col 12 & length four.Both the files have similar RECFM & LRECL.
File1
-----
Code:
SIVA 12348 JAVA
MALL 23478 NET
NISH 34589 TESTING
File2
-----
Code:
SIVA 12348 JAVA
MALLI 23478 NET
AIZAZ 56798 JAVA
NISH 34589 TESTING
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed Nov 05, 2008 12:02 pm Post subject:
Your description seems to contradict itself. First you say "if the records are present in either file2 ,then I want to write those records to an output file", but then you say " WANT TO WRITE NON-MATCHING INTO OTHER FILE". So it's unclear if you want to write the matching records or the non-matching records.
Assuming it's the non-matching records as in your Subject title and example, you can use a DFSORT/ICETOOL job like the following:
If that's not what you want, then you need to do a better job of explaining what you do want with more details. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum