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
what is amode(24), amode(31), rmode(24) and rmode(any)?
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 perform what is varying?
What guidelines should be followed to write a structured cobol prgm?
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
What is the difference between goback, stop run and exit program in cobol?
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
What is an in line perform? When would you use it? Anything else you wish to say about it.
What is the default value(s) for an initialize and what keyword allows for an override of the default?
How many sections are there in data division in COBOL?
What is inspect in cobol ?
What is the use of intialize verb?
Write the code to count the sum of n natural numbers.
How arrays can be defined in COBOL?
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?