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 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?
I have a COBOL program that ACCEPTs some input data. How do you code the JCL statement for this?
can we modify the code in copy book? if it possible how to submit ofter the modification.
My requirement is : How to populate a empty PS/flat file with ONLY spaces in the first line. You should not use any input dataset to do this. I'm not sure whether you may use any utility for this purpose?
hi iam learning mainframes,can anybody tell me how to check JCL errors.(after submiting the JCL we have check in spool or is there any other method)
What is the difference between the JOBLIB and the STEPLIB statements?
can anyone explain me about sort in jcl with inrec and outrec ?
how do you create a dataset in a jcl with the same file organisation as that of another existing dataset?
how can u identify the db2 from jcl ?
i) Difference between ps, esds, ii) Difference between lrecl, blksize among PS, PDS issues? i.e in jcl at dcb
describe the job statement, its meaning,syntax and significant keywords?
How does jcl act on a cobol code?