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
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
) how do u code after getting data?
What is a scope terminator give example?
How do you define a variable of comp-1 and comp-2?
What do you understand by psb and acb?
What is the difference between external and global variables in COBOL?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
For rewrite, why is it mandatory that file needs to be opened?
What is comp-1 and comp-2?
i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc
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.
How you can read the file from bottom?