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
Define static linking and dynamic linking.
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
What is a SSRANGE and NOSSRANGE?
How to print 10 to 1 if the input have only 10 digit number?
What is the difference between next sentence and continue in cobol programing language?
What is Pic 9v99 Indicates in COBOL?
Which is not true about evaluate statement
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 and what keyword allows for an override of the default?
Write down the divisions of cobol program?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
What is the difference between PIC 9.99 and PIC9v99?
What type of SDLC u followed? Why?
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
What is the utilization of copybook in cobol?