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

firt read file1 move each record to table. at the end of
file1 start read file2. for each record read from file2
compare that record with all the elements from table. if it
match write that record to the output file. same procedure
follow for all the records from file2

Is This Answer Correct ?    16 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

639


What is static and dynamic call in cobol?

584


What is redefines clause in COBOL?

835


Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

5043


What is the problem of ordered sequential files access?

689






How many sections are there in data division in COBOL?

667


What is the difference between structured cobol programming and object alternativelyiented cobol?

744


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

1828


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

809


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

803


What is a report item?

729


How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?

687


How arrays can be defined in COBOL?

653


) How do u handle errors in BMS macro?

1413


If you are current on the owner of a set, what is the difference between obtain next and obtain first?

632