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

How do you reference the fixed block file formats from cobol programs

707


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 ?

1876


What is length is cobol?

651


Write the code implementing the perform … varying.

646


What is the use of intialize verb?

750






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

17047


Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.

1702


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

701


What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?

681


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2060


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

744


System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

1589


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1657


What is the LINKAGE SECTION used in COBOL?

892


2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic

2121