There are two flat files one having 10 records and other
having 5 records. write a cobol pgm to find the duplicate
records(matching records)from both files.



There are two flat files one having 10 records and other having 5 records. write a cobol pgm to fi..

Answer / talluri

perform 10 times
read file1
perform 5 times
read file2
if file1rec = file2rec
write file1rec to file3rec
end-if
end perform
end perform.

Is This Answer Correct ?    5 Yes 1 No

Post New Answer

More COBOL Interview Questions

How do you define a table/array in COBOL?

5 Answers   Hexaware,


How many sections are there in data division in COBOL?

0 Answers   B-Ways TecnoSoft,


In the JCL, how do you define the files referred to in a subroutine ?

2 Answers  


Differentiate COBOL and COBOL-II?

0 Answers  


Suppose i want to declare a binary comp fild of 7 byte .how to write?

6 Answers   IBM,






Suppose i have a Cobol field of 10 byte. it contains a decimal sign.How to know where is the point location?

1 Answers  


Determine the total no of bytes in the following. 01 rec1. 02 a pic x(6) 02 b redefines a. 03 c occus 6 times pic 9. 02 d occurs 6 times pic 9. 03 e pic x(5) 03 f pic 999.

12 Answers  


How to open and see copy book ?

3 Answers  


I have a variable account-number declared as comp-3, s9(10) comp-3 in a file. How do i find a particular account number say 123456 in that file?

3 Answers  


I have a PS file and I would like to manually insert the binary values (like a COMP format) into the file. How can i do that? the way do in COMP-3 format.. suppose i want to insert -12345 in to file in comp-3 format. simply we can open a file in edit mode and do HEX-ON and insert the value . SEE BELOW-- 135 24D in 3 bytes - this will be COMP-3 presenatation of -12345.

1 Answers  


COMP field occupy ?

2 Answers  


A LESS 1200 IF B GREATER 25 MOVE 47 TOC ELSE MOVE 57 TO C IF A GREATER 249 MOVE 67 TO C ELSE NEXT SENTENCE ELSE IF B LESS 67 MOVE 27 TO C What will be the value of C, when A is 137 and b is 25

3 Answers   TCS,


Categories