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
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 |
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 |
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 |
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 |
how can i use the parameters decalred in main pgm in sub pgm
how many max steps can we use in a job? pls answer to my question
describe the dd statement,its meaning,syntax and keywords?
How to do automated restart when a job abend?
What is the difference between specifying DISP=OLD and DISP=SHR for a dataset?
I have a PDS and want to omit few rows of all members of a PDS. How to do it?
How is the keyword DUMMY used in JCL?
In job processing, what happens in conversion stage?
do we need to mention the location of catalogued procedure for each it's call in a single job?
How many types we can give input to JCL
there are 10 steps in jcl how to execute the steps from step2 to step8 only
Describe the various parameters utilized in the creation of a gdg?