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 / pa

load any of the file to the table and use SEARCH.
write the matching records to the output file.

Is This Answer Correct ?    4 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how do you reference the fixed unblock file formats from cobol programs

712


Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks

2337


What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?

681


What is the difference between comp and comp-3 usage?

681


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

2725






how to refer the data field?

1812


How did the release of cobol/370 version 1.3 improve the performance of release 1.1?

645


Write a program to explain size error.

677


What kind of error is trapped by on size error option?

743


What is amode(31)

726


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

712


2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic

2122


Give some examples of command terminators?

759


Write some characteristics of cobol as means of business language.

621


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

748