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
i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc
Explain about different table spaces.
i need a small 3d program using inline and outline.
State the various causes of s0c1, s0c5 and s0c7.
What is redefines clause in COBOL?
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
IF I mention stop run in CICS what happens?
how do you reference the ksds vsam file formats from cobol programs
What is the difference between Call and a Link?
What are various search techniques in cobol? Explain.
Write a program to enter and display the names of students in a class using the occurs clause.
Write a cobol program making use of the redefine clause.
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
Why did you choose to work with ibm mainframe cobol programming?
Name the divisions, which are available in a cobol program?