I have a File that has duplicate records. I need only those records that occur more than
thrice.?

Answer Posted / harsha

1 Sort the file on any key
2 Read file sequentially. While reading, store the record
in a working storage temporary variable and add count
counter variable.
3 Every time you read record, compare it with temporary
variable. if it is same increase counter otherwise reset
counter.
4 When counter become greater than three, write record to
an outfile.

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a SSRANGE and NOSSRANGE?

1171


Give some examples of command terminators?

985


explain sorting techniques in cobol program?

928


Write a program to explain size error.

934


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2326


How can you get the ksds file records into your cobol program?

886


Define cobol?

1098


What is the difference between PIC 9.99 and PIC9v99?

1071


If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly

2913


Can we change the password using ALTER? anyone tried and changed?

1781


State the various causes of s0c1, s0c5 and s0c7.

884


What is comp-1 and comp-2?

968


What is the difference between goback, stop run and exit program in cobol?

1284


what are decleratives in cobol?

2032


)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?

1794