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 binary search and sequential search?
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.
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
What rules are followed by the search verb.
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?
How to print 10 to 1 if the input have only 10 digit number?
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
What is an in line perform? When would you use it? Anything else you wish to say about it.
What are the pertinent COBOL commands?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
How to know whether the module is dynamical or statistical?
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
What is length is cobol?
What type of SDLC u followed? Why?