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 / michar de papachuil

This might help you here but you have to Sort the two files
first before doing the match.

IF File1 = File2
PERFORM 2400-MATCH-BOTH-FILES THRU 2400-EXIT
PERFORM 2100-READ-FILE1 THRU 2100-EXIT
PERFORM 2200-READ-FILE2 THRU 2200-EXIT

ELSE

IF I-GROUP-SUBSYSTEM LESS THAN I-MODULE-SUBSYSTEM
PERFORM 2600-UNKNOWN-FILE1-VALUES THRU 2600-EXIT
PERFORM 2100-READ-FILE1 THRU 2100-EXIT
ELSE
PERFORM 2500-UNKNOWN-FILE2-VALUES THRU 2500-EXIT
PERFORM 2200-READ-FILE2 THRU 2200-EXIT
END-IF

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

1540


How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?

2474


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

4727


What is amode(31)

1178


Write a program to explain size error.

1204


What is the default value(s) for an initialize and what keyword allows for an override of the default?

1214


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

1116


What are the different rules to perform a Search?

1100


Define static linking and dynamic linking.

1201


What the difference is between continue and next sentence?

1175


What is the difference between PIC 9.99 and 9v99 in COBOL?

1335


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

1117


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

1285


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

9109


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

7552