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

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

Answer / naidu sekhar yandrapu

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 , XSUM
/*

Is This Answer Correct ?    1 Yes 0 No

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

Answer / ehatesham

//SORTXSUM DD DSN=datasetname,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(1,4),RLSE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
.
.
//SYSIN DD *
SORT FIELDS=(1,3,CH,A)
SUM FIELDS=NONE,XSUM
/*

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks

0 Answers  


how many bytes does s9(7)COMP-3 field occupies?

6 Answers   ADP,


What is Redefines clause?

8 Answers  


s9(18) comp-3:: What is the size of memory it takes internally?

4 Answers  


after udatingg first 110 rows, my job abends. now how do i change my cobol program so that when i restart the Job it will start updating from 111th row ( i.e in next run I di=ont want to update those 110 rows which are already been updated in the first run before job abend)

7 Answers   Allianz, Wipro,






How To move a value to an array using move verb?

3 Answers   IBM,


which is faster either static call or dynamic call ? and specify the reasons for it ? reply fast

1 Answers  


In CICS/VSAM every file that is accessed should be defined in FCT. we have CICS READ, WRITE, BROWSE commands for VSAM files. How does it work with DB2 tables. It know it has to do with the plan. Please expain with examples.

1 Answers  


What is the LINKAGE SECTION used in COBOL?

0 Answers   UGC Corporation,


how do you reference the rrds file formats from cobol programs

0 Answers  


what are the control characters used in reports

1 Answers  


how can we get current dat and time thru cobol pgm

3 Answers   DELL,


Categories