How to compare two files with matching records?

How to compare two files with matching records?

Suppose I have 2 input files FILE1 and FILE2. And I need to non-matching records from FILE1 and FILE2 into FILE 3 as well as I want to write matching records also into FILE3.If there is matching based on key in FILE1 and FILE2 then matching record to be written must be picked from FILE1/FILE2 on basis of some condition.

How to get the matching and non matching records from two?

-> Write the Non matching records from FILE1 into FILE4. -> Write the Non matching records from FILE2 into FILE5. The key position in both the Input Files is (1,10). Can anybody please let me know the SORTCARD, how Can I get this in single step in SyncSort?? Thanks in Advance, Rajasekhar Jannu.

How to compare two files with a 7 byte key?

A seven byte key is used to compare both files, if there is a match then it needs to be written to “match” file but while writing to match file I need a few fields from infile1 and all other fields from infile2. If there is no match then write to no match file.

Is the key position in both input files the same?

The key position in both the Input Files is same. Can anybody please help me to write SORTCARD, how Can I get this in single step in SyncSort or DFSort?? in reformat fields, you can mention the fields as you want, i.e.., if you want matching records to be picked from file2 then mention those fileds beside F2:

How to compare columns from two different files?

If there is a match, print the corresponding value of the third column from the second file to the first file. If no match is found, fill with “NA” No exactly what you want, but using small tools is always nice.

Which is the best program for file matching?

You can implement the logic using 1. JCL program – Use of JOIN KEYS 2. COBOL program – File matching logic (Both the logic are explained in the following link) 3. Easytrieve or REXX program

How to write match and nomatch in mainframe?

The joined data will simply be written to SORTOUT. The JOIN statement defines that as well as matched records, UNPAIRED F1 and F2 records are to be presented to the Main Task. The REFORMAT statement defines the record which will be presented to the Main Task.