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 / harsha
First merge bothe file.
Use sort card
//Sysin dd *
sort fields=-------
Sum fields=(none,xsum)
/*
File mentioned in SORTXSUM dd name will contain matching
records.
Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What is the difference between external and global variables in COBOL?
How do you define a variable of comp-1 and comp-2?
What are the different rules for performing sort operation?
How many bytes S(8) comp field occupy and its maximum value?
Which is not true about evaluate statement
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
How to remove 2 duplicate records and copy only one using job control language?
A table has two indexes defined. Which one will be used by the SEARCH?
Whats the difference between search & search ALL?
What are the various section in data division and briefly explain them.
What is the default value(s) for an initialize and what keyword allows for an override of the default?
how to refer the data field?
What is amode(31)
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