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 |
Mainframes gets a text file that contains the name of the file. Now using JCL i want to locate that file name in the mainframe system and perform further processing. Please tell how to proceed
How can I write the joblog in the spool on normal end of a job step and direct the joblog to a dataset only if the step abends?
jcl is like a complier....?
Can I send output of job to my remote device careerride123?
what does mvs stand for?
The maximum number of in-stream procedure you can code in any JCL is ?
Explain dd statement in jcl?
How to view the hexa decimal value thru file aid if copy book is not present for that particular data
How is a new GDG coded?
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.
How to fetch even records from one file to another file by using ICETOOL in JCL?
In sms datasets, what is the function of the dd mgmtclas keyword?