I have the requirement to compare the two files and pick up
the matching records.
File 1. file2

23 32
32 13
34 15
35 36
36 35
43

Get the matching records from this 2 files to out file. how
you will do this in cobol program?

Answer Posted / harsha

First merge bothe file.
Use sort card
//Sysin dd *
sort fields=-------
Sum fields=(none,xsum)
/*

File mentioned in SORTXSUM dd name will contain matching
records.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1846


How many sections are there in data division in COBOL?

680


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

826


Why would you use find and get rather than to obtain?

692


) How do u handle errors in BMS macro?

1429






Define cobol?

866


What is the difference between comp and comp-3?

704


How are the next sentence and continue different from each other?

766


What is the utilization of copybook in cobol?

657


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

1933


how to convert the recors form vsam file to db2 table tru file aid

2763


input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?

1876


i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?

897


Explain how to differentiate call by context by comparing it to other calls?

689


How many bytes S(8) comp field occupy and its maximum value?

1635