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 |
what does mvs stand for?
What are the rules employed while naming the steps in a job?
What do you understand by the term notcat 2 – gs?
What is the meaning of the following declaration : DCB=BLKSIZE=, What is the difference between above declaration & not specifying DCB at all for a output file?
wht r different types of sorts ?
I need to compare two VSAm files. In input VSAM file some fields are updating and the updated feilds are coming into the output file. now i need to compare these two files with respect to a perticular field. Please suggest a suitable JCL code me.
i have five step in jcl.my forth step is gdg.gdg was abend.when will job complete,hoe to handle you
how many types of sorts are there in jcl?
Can anyone tell me the syntax for printing two files at two different destinations in a single step?
can i sort packed decimal if i can tell the syntax
How to get cursor position from system in CICS environment ?
how to write a jcl prog to copy alternate recs from ps1 to another ps2,suppose ps1 having 10 recs?