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
How do you get the data to code the BMS macro?
Explain how you can characterize tables in cobol?
Name some of the examples of COBOl 11?
What are literals?
How many bytes S(8) comp field occupy and its maximum value?
Are you comfortable in cobol or jcl?
What are declaratives and what are their uses in cobol?
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?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
how do you reference the printer file formats from cobol programs
example for sub strings ? and refernce modifications whit output pls
how to access the file from prodution from changeman tool and to submit a file to production
Why would you use find and get rather than to obtain?
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