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
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
For rewrite, why is it mandatory that file needs to be opened?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
Explain the configuration section of a cobol program with examples of syntax.
Discuss about changing dataset name in proc.
) How do u handle errors in BMS macro
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
) how do u code after getting data?
How are the next sentence and continue different from each other?
Differentiate between structured cobol programming and object-oriented cobol programming.
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.
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
What is the utilization of copybook in cobol?
What are the different rules of SORT operation?