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

In which area will you utilize 88 level items in cobol?

1096


What is cobol?

1189


What is inspect in cobol ?

1240


How do you differentiate between cobol and cobol-ii?

1125


What is length is cobol?

1052


State the various causes of s0c1, s0c5 and s0c7.

1025


What is the difference between structured cobol programming and object alternativelyiented cobol?

1183


what is difference between cobol and cobol/400

22729


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

1172


Explain about different table spaces.

1044


How arrays can be defined in COBOL?

1132


Mention the guidelines to write a structured cobol program?

1026


I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?

1601


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

1174


What is a report item?

1092