write a program to eliminate duplicate records in a input file
and send them to output file.THIS IS IGATE RECENT
QUESTIONN.....JUST 1 WEEK BACKKKK...
Answer Posted / kumarmf2004
Step1. Make sure that the input is sorted on the field
you are validating as duplicates (IN-FIELD in this
case)
Step2. In your program
IF IN-FIELD = HOLD-FIELD
CONTINUE
ELSE
WRITE OUTREC
MOVE IN-FIELD TO HOLD-FIELD
END-IF
READ IN-FILE
Keep performing Step 2 until end of file
Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
What is the compute verb? How is it used?
what is s000 u4087 error? please give the all error codes in cobol,jcl.
What is comp-1 and comp-2?
Write a program to explain size error.
Write the code to count the sum of n natural numbers.
What is report-item in COBOL?
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
What is the Purpose of POINTER Phrase in STRING command in COBOL?
what is difference between cobol and cobol/400
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
how can i see junk values in dclgen or in hostvariable of comp ?
I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.
What are various search techniques in cobol? Explain.
For rewrite, why is it mandatory that file needs to be opened?