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 / kalone
First load both the files into 2 arrays and then sort them
on say ASC criteria and then take the first element from 1
file and compare with the element of other file , if
matches write into Outfile ,like wise we can keep on
reading & comparing till we get all the matching values in
the outfile.
Is This Answer Correct ? | 6 Yes | 5 No |
Post New Answer View All Answers
What are the access modes of START statement?
explain sorting techniques in cobol program?
What are different data types in cobol?
Write some characteristics of cobol as means of business language.
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
what is the difference between COBOL2 AND COBOL390?
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
How do you define a variable of comp-1 and comp-2?
How do define dynamic array in cobol.
What is redefines clause in COBOL?
How many bytes S(8) comp field occupy and its maximum value?
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
Explain the configuration section of a cobol program with examples of syntax.
What is the utilization of copybook in cobol?