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

IN COBOL
IF FILE1>FILE2
READ FILE2
IF FILE1<FILE2
READ FILE1
IF FILE1=FILE2
WRITE FILE3
READ FILE1
READ FILE2.......
IN JCL
//XSUM DD DSN=XSUM.MATCH
//SYSIN DD *
SORT FIELDS=COPY
SUM FIELDS=NONE,XSUM
/*

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When is inspect verb is used in cobol?

663


how to convert the recors form vsam file to db2 table tru file aid

2742


What is the compute verb? How is it used?

649


can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

1942


I have a File that has duplicate records. I need only those records that occur more than thrice.?

8589






What is the difference between binary search and sequential search?

628


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

809


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.

1996


What is cobol?

732


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

645


What rules are to be followed while using the corresponding options?

627


State the various causes of s0c1, s0c5 and s0c7.

652


What is the difference between PIC 9.99 and 9v99 in COBOL?

722


What are the pertinent COBOL

2031


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

669