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 / vinod
if f1 = f2
move file1-rec to file3-rec
write file3-rec
if f1 < f2
move file2-rec to file4-rec
write file4-rec.
if f1 > f2
move file1rec to file4-rec
write file4-rec
| Is This Answer Correct ? | 2 Yes | 6 No |
Post New Answer View All Answers
How can you get the ksds file records into your cobol program?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
What type of SDLC u followed? Why?
What is a report item?
i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc
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 difference between PIC 9.99 and 9v99 in COBOL?
how do you reference the printer file formats from cobol programs
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
how to move the records from file to array table. give with code example
Why would you use find and get rather than to obtain?
how do you reference the fixed unblock file formats from cobol programs
What is the difference between Call and a Link?
explain sorting techniques in cobol program?