Suppose, file A has 100 records and file B has 500 records. We
want to write records common to both A and B into file C and
records which are present only in either A or B into another file D.
What should be the logic of Cobol program to achieve this?

Answer Posted / hardik dave

Use SYNCSORT and you will get all matching records in one
file and all those non matching records in another. Just
read more on SYNCSORT and you will be clear.

Is This Answer Correct ?    3 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we redefine the field of x(200) to less than 200?

818


What is the difference between external and global variables in COBOL?

813


Which division and paragraphs are mandatory for a COBOL program?

709


Name some of the examples of COBOl 11?

2686


I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.

2008






Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

823


What happens when we move a comp-3 field to an edited (say z (9). Zz-)?

780


how to access the file from prodution from changeman tool and to submit a file to production

6686


Explain the configuration section of a cobol program with examples of syntax.

659


Describe the cobol database components?

681


Write a cobol program making use of the redefine clause.

732


Write the code to count the sum of n natural numbers.

699


How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?

648


what are decleratives in cobol?

1827


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

2116