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

i have two file, each file having : file1 is having 2 fields field1 field2 file2 is having 3 fields field1 field2 field3 my req is to make it one file like: field1 field2 field1 field2 field3 if anyone know please send me syntax, i tried this with DFSORT but could not succeed.

9 Answers   Syntel,


how can u find out just by seeing wheater it is main program or sub program ? any two ways to identify reply soon ?

2 Answers  


01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING". 01 NAME2 PIC X(13). now I want to display the value of NAME1 in reverse order i.e value should be displayed as "GNIMMARGORP LOBOC" HOW can I do that ??? please let me know if any one knows it.

11 Answers   FirstApex, NIIT,


What kind of error is trapped by on size error option?

0 Answers  


What is difference between com and com3? Eg. s9(4) so what is the memory it will occupy com and com3.

2 Answers  






DATAONLY, MAPONLY functionality?

1 Answers   IBM,


which generation language is cobol

4 Answers   Kanbay,


What is cobol?

0 Answers  


period is missing in the cobol program which error we getting

5 Answers   TCS, Tesco,


How do you set a return code to the JCL from a COBOL program?

4 Answers  


How to solve SOC7. I have the cobol coded as below 01 A PIC 9(4). 01 AIN REDEFINES A. 05 AIN1 PIC S9(4) 01 B PIC 9(4)V99. 01 BIN REDEFINES B. 05 BIN1 PIC S9(4)V99. PROCEDURE DIVISION. START-PARA. INITIALIZE A AIN B BIN. ACCEPT A B. DISPLAY 'VALUE OF A=' A. DISPLAY 'VALUE OF B=' B. DISPLAY 'VALUE OF BIN1=' BIN1. DISPLAY 'VALUE OF AIN1=' AIN1. COMPUTE AIN1 = BIN1 - AIN1. DISPLAY 'VALUE OF AIN1=' AIN1. When i'm executing this code i'm getting SOC7 for A = 12 & B=34. Can someone explain SDSF OUTPUT DISPLAY TCOM058R JOB05458 DSID 102 LINE 0 COLUMNS 02- 81 COMMAND INPUT ===> SCROLL ===> CSR ********************************* TOP OF DATA ********************************** VALUE OF A=12 VALUE OF B=34 VALUE OF BIN1=34 VALUE OF AIN1=12 CEE3207S The system detected a data exception (System Completion Code=0C7). From compile unit PROG1 at entry point PROG1 at statement 29 at compile +000004CE at address 00007ECE. Please address how to solve this issue Thanks in advance.

1 Answers  


What is the difference between structured cobol programming and object alternativelyiented cobol programming?

0 Answers  


Categories