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 amode(31)

1223


) How do u handle errors in BMS macro

2105


Which Search verb is equivalent to PERFORM…VARYING?

1106


what is amode(24), amode(31), rmode(24) and rmode(any)?

1199


If you are current on the owner of a set, what is the difference between obtain next and obtain first?

1443


How do get the result of your program directly on your pc?

2397


What kind of error is trapped by on size error option?

1293


Why would you use find and get rather than to obtain?

1264


What is the difference between goback, stop run and exit program in cobol?

1648


what is the use of outrecord?

2275


how do you reference the variable unblock file formats from cobol programs

1382


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

2189


What guidelines should be followed to write a structured cobol prgm?

1215


What is inspect in cobol ?

1356


How many sections are there in data division in COBOL?

1185