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
Name some of the examples of COBOl 11?
What are the different data types in cobol?
what is search and searchall?what is the diffrence between them?give an best example?
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
What are 77 levels used for?
what is the use of outrecord?
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?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
How do you reference the following file formats from cobol programs?
How to know whether the module is dynamical or statistical?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
What is comp-1 and comp-2?
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.
what is amode(24), amode(31), rmode(24) and rmode(any)?
How to remove 2 duplicate records and copy only one using job control language?