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

file status 00 is checked after opening the file or reading the file

4 Answers   John Deere,


how to resolve the file status 47.......

1 Answers   MMM,


What is SSRANGE, NOSSRANGE ?

5 Answers  


how we rectify soc4 and soc7 error in project(need real time answer)? please reply

3 Answers   HCL, Wipro,


a pic s9(4) comp b pic s9(4) comp-3 c ???????????????? d ???????????????? move a to c add a+B giving d. what is ur declaration for c,d?

4 Answers  






HELLO FRIENDS, THIS IS JANARDHAN.GADIRAJU, I FACED ONE INTERESTING QUESTION IN COBOL, THAT IS WHAT ARE THE VALUES WE CAN SEE IN HIGHVALUES AND LOWVALUES, CAN U PLEASE GIVE ME THE ANSWER

7 Answers   Patni,


What are the different rules for performing sort operation?

0 Answers  


The order of precedence of arithmetic operators in an expression can be overridden with the use of (a) [] (b) () (c) {} (d) Any of the above

3 Answers   TCS,


COMP field occupy ?

2 Answers  


Determine the total no of bytes in the following. 01 rec1. 02 a pic x(6) 02 b redefines a. 03 c occus 6 times pic 9. 02 d occurs 6 times pic 9. 03 e pic x(5) 03 f pic 999.

12 Answers  


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

0 Answers  


what happens if parmparameter passes zero bytes to the program

0 Answers   HSBC,


Categories