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 / m
correction to #3
sort files Asc
if f1 = f2
move file1-rec to file3-rec. write file3-rec
read f1 & f2.
if f1 < f2
move file1-rec to file4-rec. write file4-rec.
read f1.
if f1 > f2
move file2-rec to file4-rec. write file4-rec
read f2.
| Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
How do you reference the fixed block file formats from cobol programs
What is the difference between Call and a Link?
What are the different rules of SORT operation?
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?
1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?
what is difference between cobol and cobol/400
how do you reference the printer file formats from cobol programs
What guidelines should be followed to write a structured cobol prgm?
What are the pertinent COBOL commands?
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
Difference between cobol and cobol-ii?
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
Explain what you understand by passing by value.
What the difference is between continue and next sentence?
How do you get the data to code the BMS macro?