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 remove 2 duplicate records and copy only one using job control language?

736


how do you define single dimensional array and multidimensional array in your cobol?

667


System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

1586


What is a report item?

737


In COBOL, what is the different between index and subscript?

753






There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

928


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1645


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

851


What rules are followed by the search verb.

631


What is the difference between comp and comp-3 usage?

673


How do define dynamic array in cobol.

668


how can i see junk values in dclgen or in hostvariable of comp ?

2538


How do get the result of your program directly on your pc?

1877


I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?

1228


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

709