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

How to know whether the module is dynamical or statistical?

648


input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.

1770


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

1757


What is static and dynamic call in cobol?

586


What is inspect in cobol ?

791






How to remove 2 duplicate records and copy only one using job control language?

729


What is the utilization of copybook in cobol?

648


What happens when we move a comp-3 field to an edited (say z (9). Zz-)?

764


what is search and searchall?what is the diffrence between them?give an best example?

5528


What is the difference between a binary search and a sequential search what are the pertinent cobol?

724


How do you reference the fixed block file formats from cobol programs

692


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

914


Explain what you understand by passing by value.

685


what is the difference between COBOL2 AND COBOL390?

2438


Explain about different table spaces.

641