how to eliminate the duplicates in sorting
Answer Posted / stu
Pandu,
Answers 1 & 3 are correct. SUM FIELDS tells SORT that only
1 record with the the same values in the SORT FIELDS will be
written to the SYSOUT. SUM FIELDS=NONE tells SORT there are
no fields to SUM, but only keep one record for each distinct
combination of the sort fields.
Examples:
SORT FIELD=1,5,CH,A) SORT FIELD=1,5,CH,A)
SUM FIELDS=(7,1,ZD) SUM FIELDS=NONE,EQUALS
----+----1 ----+----1
PANDU 1 PANDU 1
PANDU 4 PANDU 4
CRAIG 3 CRAIG 3
PANDU 3 PANDU 3
HARPO 6 HARPO 6
results in
----+----1 ----+----1
CRAIG 3 CRAIG 3
HARPO 6 HARPO 6
PANDU 8 PANDU 1
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
How can return codes be tested before execution of a job step?
How to submit jcl through a cobol program?
When output dataset space is required, what quantity categories are used?
if we want to use a gdg which is already created by some job, then how to use the reference of the last generation in a jcl?
Explain dfsort utility?
Explain the purpose of dd dummy statement?
What is jcl in mainframe, and how many types of jcl statements are there for a job?
what is DSN in JCL and what are the parameters to declare the DSN?
What do you understand by jcl?
How to pass data to a program that is coded in an exec statement?
How to do automated restart when a job abend?
How to find the UNIT and VOLUME of a (a) KEPT (b) UNCATALOGED and (c) CATALOGED dataset - using (i) JCL and using (ii) ISPF ?
I need exexution process for JCL programs
Explain the function of //jcllib statement?
How to run cobol program using jcl?