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 / pradeep
read all the records of file1 and load into array
read the record of second file one at a time and search for
the value in the array(table) using search
if the value of the file matches with the value in the table
then write that record to output file
Is This Answer Correct ? | 1 Yes | 8 No |
Post New Answer View All Answers
For rewrite, why is it mandatory that file needs to be opened?
Which Search verb is equivalent to PERFORM…VARYING?
Why would you use find and get rather than to obtain?
what is amode(24), amode(31), rmode(24) and rmode(any)?
What are the different data types in cobol?
What are the different types of condition in cobol and write their forms.
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?
How to print 10 to 1 if the input have only 10 digit number?
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
How do you reference the following file formats from cobol programs?
Write a program to enter and display the names of students in a class using the occurs clause.
Write a program to explain size error.