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
A table has two indexes defined. Which one will be used by the SEARCH?
What do you understand by psb and acb?
) how do u code after getting data?
What are all the divisions of a COBOL program?
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?
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 type of SDLC u followed? Why?
What is a report item?
Difference between array and sub-script ?
Have you used comp and comp-3 in your project? And how?
what is s000 u4087 error? please give the all error codes in cobol,jcl.
) How do u handle errors in BMS macro?
How do we get current date from system with century in COBOL?
What are declaratives and what are their uses in cobol?
How to remove 2 duplicate records and copy only one using job control language?