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

read all the records of file1 and load into array

read the record of second file one at a time and search for
the value in the array(table) using search

if the value of the file matches with the value in the table
then write that record to output file

Is This Answer Correct ?    1 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do define dynamic array in cobol.

675


What is the difference between PIC 9.99 and PIC9v99?

783


What is the difference between a binary search and a sequential search what are the pertinent cobol?

737


What are the different data types in cobol?

801


What is rmode(24)

684






What is the compute verb? How is it used?

666


What is the difference between Global and External Variables?

666


What is the Purpose of Pointer in the string?

645


What is a report item?

743


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?

1234


What is the default value(s) for an initialize and what keyword allows for an override of the default?

699


which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad

1026


Name some of the examples of COBOl 11?

2688


how to refer the data field?

1813


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

714