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


Please Help Members By Posting Answers For Below Questions

What is the compute verb? How is it used?

653


what is s000 u4087 error? please give the all error codes in cobol,jcl.

17026


What is comp-1 and comp-2?

756


Write a program to explain size error.

669


Write the code to count the sum of n natural numbers.

697






What is report-item in COBOL?

704


How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

2728


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

817


What is the Purpose of POINTER Phrase in STRING command in COBOL?

713


what is difference between cobol and cobol/400

21556


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

697


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

2538


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.

1111


What are various search techniques in cobol? Explain.

641


For rewrite, why is it mandatory that file needs to be opened?

620