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
What is the difference between next sentence and continue in cobol programing language?
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
i want a program using by if, evaluate , string, unstring, perform, occurs?
example for sub strings ? and refernce modifications whit output pls
Name some of the examples of COBOl 11?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
Which is not true about evaluate statement
how do you reference the variable unblock file formats from cobol programs
What is perform what is varying?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
What are the different open modes available in cobol?
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
What are literals?