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

Define cobol?

860


What is the use of intialize verb?

746


What the difference is between continue and next sentence?

658


Whats the difference between search & search ALL?

5264


i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc

2105






how to move the records from file to array table. give with code example

2219


What are declaratives and what are their uses in cobol?

714


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1905


Discuss about changing dataset name in proc.

759


What are the different data types in cobol?

793


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

748


What is the problem of ordered sequential files access?

698


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

708


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1845


Which Search verb is equivalent to PERFORM…VARYING?

685