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

EVALUATE KEY1 > KEY2 ALSO KEY2 < KEY1
WHEN FALSE ALSO FALSE
READ F1 NEXT RECORD
READ F2 NEXT RECORD
WHEN TRUE ALSO FALSE
READ FILE1 NEXT RECORD
WHEN FALSE ALSO TRUE
READ FILE2 NEXT RECORD
END-EVALUATE

Is This Answer Correct ?    3 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1981


Explain how you can characterize tables in cobol?

1064


Name some of the examples of COBOl 11?

3148


What are literals?

1147


How many bytes S(8) comp field occupy and its maximum value?

2147


Are you comfortable in cobol or jcl?

1056


What are declaratives and what are their uses in cobol?

1207


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?

1654


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

2381


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

1126


how do you reference the printer file formats from cobol programs

1227


example for sub strings ? and refernce modifications whit output pls

2323


how to access the file from prodution from changeman tool and to submit a file to production

7555


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

1193


write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc

1243