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
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
Explain how to differentiate call by context by comparing it to other calls?
Explain about different table spaces.
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
What are the different open modes available in cobol?
Can we redefine the field of x(200) to less than 200?
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
What is report-item in COBOL?
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
how do you reference the esds vsam file formats from cobol programs
Explain the configuration section of a cobol program with examples of syntax.
What is comp-1 and comp-2?
What guidelines should be followed to write a structured cobol prgm?