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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define static linking and dynamic linking.

872


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

2008


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

946


what happens if parmparameter passes zero bytes to the program

1877


How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?

2228


Difference between array and sub-script ?

1378


What is the default value(s) for an initialize and what keyword allows for an override of the default?

957


How do you reference the following file formats from cobol programs?

912


Which mode is used to operate the sequential file?

928


What is inspect in cobol ?

1011


here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?

7298


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

913


What are literals?

859


What guidelines should be followed to write a structured cobol prgm?

865


What is the usage of comp fields in cobol?

877