Suppose, file A has 100 records and file B has 500 records. We
want to write records common to both A and B into file C and
records which are present only in either A or B into another file D.
What should be the logic of Cobol program to achieve this?
Answer Posted / shrik
Sort both file A and B using the Key in ascending order..
Then read File A and B..
Compare records read frm A and B
If found Equal write into File C (common records)
If NOT write into file D
| Is This Answer Correct ? | 6 Yes | 8 No |
Post New Answer View All Answers
What are 77 levels used for?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?
I have a File that has duplicate records. I need only those records that occur more than thrice.?
What is Pic 9v99 Indicates in COBOL?
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 ?
What is the difference between comp and comp-3?
how can i see junk values in dclgen or in hostvariable of comp ?
How do u write test cases?
How do you get the data to code the BMS macro?
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
Discuss about changing dataset name in proc.
how do you reference the ksds vsam file formats from cobol programs
Name the divisions, which are available in a cobol program?
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
Why would you use find and get rather than to obtain?