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
How to remove 2 duplicate records and copy only one using job control language?
how do you define single dimensional array and multidimensional array in your cobol?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
What is a report item?
In COBOL, what is the different between index and subscript?
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.
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
What rules are followed by the search verb.
What is the difference between comp and comp-3 usage?
How do define dynamic array in cobol.
how can i see junk values in dclgen or in hostvariable of comp ?
How do get the result of your program directly on your pc?
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?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?