Given a input file with duplicates how to remove the
duplicate records from the file using JCL?

Answers were Sorted based on User's Feedback



Given a input file with duplicates how to remove the duplicate records from the file using JCL?..

Answer / sudee

//STEP10 EXEC PGM=SORT,REGION=1024K
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...,DISP=SHR
//SORTOUT DD DSN=...
//SYSIN DD *
SORT FIELDS=copy
SUM FIELDS=NONE
/*
//

Is This Answer Correct ?    25 Yes 12 No

Given a input file with duplicates how to remove the duplicate records from the file using JCL?..

Answer / tidda

This can be done by using Sort.

1) If the first duplicate is to be kept, we use SUM
FIELDS=NONE

2) If none of the duplicates are to be kept, using SYNCTOOL
or ICETOOL, use the NODUPS option.

Is This Answer Correct ?    16 Yes 6 No

Given a input file with duplicates how to remove the duplicate records from the file using JCL?..

Answer / subbu

in sort field we can give SUM Fields=None

Is This Answer Correct ?    7 Yes 3 No

Given a input file with duplicates how to remove the duplicate records from the file using JCL?..

Answer / sreedhar naidu dhekodna

We can also use the ICETOOL SELECT Operator along with its
operands for removing duplicates.

Is This Answer Correct ?    2 Yes 2 No

Given a input file with duplicates how to remove the duplicate records from the file using JCL?..

Answer / vivek

You can use XSUM

Is This Answer Correct ?    0 Yes 0 No

Given a input file with duplicates how to remove the duplicate records from the file using JCL?..

Answer / alan at accenture

the existing record of present file and the duplicate
record of previous file wnen sort both files, if both are
duplicated records both must be removed and there is no
existing record in the file. Got it? thanksalan

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More JCL Interview Questions

can u explain gdg with example wht happens if we give limit,empty,noempty,scartch and no scartch

1 Answers   IBM,


what is the default region size if I dont specify region parametre in my job card ( I know that if I specify region=0k or 0M, then the job will occupy all he available resources at the time of job execution), but I want to know the defult value for "region" paramatre.

5 Answers   BirlaSoft, Infosys,


How do you skip a particular step in a proc/JOB?

5 Answers   CSC, CTS,


i have two flat files.i want to select one record from that file by using jcl.for example file1 contains emp no,name,joining date. file2 has same details.emp no is primary key. i will give empno.that emp details send to outfile.please let me know if any one knows it.give sample code.

1 Answers   TCS,


Suppose I have 5 dataset listed under a single DD name in a catlogued PROC. How can I override one of those 5 dataset (say 3rd dataset)?

5 Answers   Cognizant,






If a JOBSTEP abends, AND without using COND also, all the subsequent steps execute, then what is the use of using EVEN ? Why do we use EVEN when without it also all the JOBSTEPs execute ?

2 Answers   IBM,


Does jcl support automatic restart?

0 Answers  


What is the difference between Sysin,Sysout,Sysdbout and Sysudump?

3 Answers  


What is the parameter to be passed in the job card for the unlimited time , irrespective of the job class ?

2 Answers   IBM,


List the different jcl statements that are not permitted in the procedures?

0 Answers  


We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?

0 Answers   IBM,


Can we give two user name in NOTIFY parameter in JOBCARD

1 Answers   Syntel,


Categories