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 / kalone
First load both the files into 2 arrays and then sort them
on say ASC criteria and then take the first element from 1
file and compare with the element of other file , if
matches write into Outfile ,like wise we can keep on
reading & comparing till we get all the matching values in
the outfile.
Is This Answer Correct ? | 6 Yes | 5 No |
Post New Answer View All Answers
What are the cobol coding sheets?
What rules are followed by the search verb.
Why did you choose to work with ibm mainframe cobol programming?
what is the difference between COBOL2 AND COBOL390?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
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?
What rules are to be followed while using the corresponding options?
Difference between array and sub-script ?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
Discuss about changing dataset name in proc.
How do you get the data to code the BMS macro?
What is the Purpose of Pointer in the string?
In COBOL programming, what is PERFORM? What is VARYING?
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
example for sub strings ? and refernce modifications whit output pls