The following question was asked in one of the interviews.
I have two files say FILE1 and FILE2
Contents of FILE1
and so on... Approximately 10 million records in FILE1
Contents of FILE2
and so on... Approximately 20 million records in FILE2
I want to get information from both the file where EmpNo is same and write FILE 3, for example
Here the matching EmpNos are 2, 3 and 7
EmpNo EmpName Salary
2 Mahesh 300000
3 Suresh 250000
7 Ganesh 180000
And non-matching records, for example 1 and 9 in above case, should be written to file 4. There should also be EOF handling routine.
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
The cobol code shouldn't take any longer than the sort control statements - once there is a working model (which should already exist - IMHO).
Is it good to keep in mind that the only code that should need to be added to a decent model/skeleton is the actual fields for the match and any "other than match" logic required to meet the business requirement.