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...

Answers were Sorted based on User's Feedback



write a program to eliminate duplicate records in a input file and send them to output file.THIS I..

Answer / khasim

In Answer2 just i am editing one line to make 100% correct

SUM FIELDS=NONE,XSUM

then it will store duplicates into dataset.

Is This Answer Correct ?    10 Yes 0 No

write a program to eliminate duplicate records in a input file and send them to output file.THIS I..

Answer / shan

We can use JCL SORT utility using SYSIN DD * SUM fields =
none, will eliminate duplicate and store in a different dataset.


e.g
//SORTXSUM DD DSN=... Output eliminated by the SUM stm

//SYSIN DD *
SORT FIELDS=(1,3,CH,A)
SUM FIELDS=NONE
/*

Is This Answer Correct ?    11 Yes 2 No

write a program to eliminate duplicate records in a input file and send them to output file.THIS I..

Answer / 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

write a program to eliminate duplicate records in a input file and send them to output file.THIS I..

Answer / deepak kumar

sort fields=copy
sum fields=none

Is This Answer Correct ?    4 Yes 0 No

write a program to eliminate duplicate records in a input file and send them to output file.THIS I..

Answer / a

How to eliminate duplicate without using second file

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

how to transfer the file from pc to mainframe??

3 Answers  


In a program, variables are used but no DB2 involved in it. Can you call it as host variables??

4 Answers   EDS,


A table has two indexes defined. Which one will be used by the SEARCH?

0 Answers  


What is link edit in cobol?

0 Answers  


what is the use of filler in cobol programing?

4 Answers   MAT,






how to run sub programs using static and dynamic call ...

3 Answers   TCS,


what is the difference between Plan & package?

1 Answers   IBM,


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

0 Answers   IBM,


Which mode is used to operate the sequential file?

0 Answers  


What are the divisions in a cobol program?

1 Answers  


which is better either static call or dynamic call? and why?

5 Answers   HCL,


what are the working storage fields in BMS macro?

2 Answers   IBM,


Categories