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 / kalone
First load both the files into 2 arrays and then sort them
on say ASC criteria and then take the first element from 1
file and compare with the element of other file , if
matches write into Outfile ,like wise we can keep on
reading & comparing till we get all the matching values in
the outfile.
| Is This Answer Correct ? | 6 Yes | 5 No |
Post New Answer View All Answers
What are various search techniques in cobol? Explain.
What is link edit in cobol?
How to know whether the module is dynamical or statistical?
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
In which area will you utilize 88 level items in cobol?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
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
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
What is the difference between comp and comp-3?
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
example for sub strings ? and refernce modifications whit output pls
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
Write down the divisions of cobol program?