Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / nnn

First sort the both files through JCL or internal sort.
Then follow below logic in the program.

Read file1
Read file2

perform until end-of file1 OR end-of file2
if file1 = file2
write a matched record to output
read file1
read file2
end-if
if file1 < file2
read file1
end-if
if file1 > file2
read file2
end-if
End-perform.

Is This Answer Correct ?    117 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the usage of comp fields in cobol?

1182


what is difference between cobol and cobol/400

22917


What are various search techniques in cobol? Explain.

1066


How do you get the data to code the BMS macro?

1963


How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?

2581


A table has two indexes defined. Which one will be used by the SEARCH?

1281


What is the difference between perform … with test after and perform … with test before?

1439


When is inspect verb is used in cobol?

1252


What is comp-1 and comp-2?

1228


)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?

2009


which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad

1502


What are the pertinent COBOL

2565


i want a program using by if, evaluate , string, unstring, perform, occurs?

4719


how do you reference the printer file formats from cobol programs

1217


What is the difference between a binary search and a sequential search what are the pertinent cobol?

1138