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
what are JCLLIB and STEPLIB in JCL?
What is the format of comment statement?
Is it possible to code instream data in a PROC?
When output dataset space is required, what quantity categories are used?
Where & How Do You Code Identifier In Jcl?
We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?
How do you submit a job for execution?
which parameter is use to declare the name of dataset in dd statement?
Is it possible to left uncode disp?
What is the motivation behind coding class parameter in job statement?
Explain the function of the dd dcb keyword?
What statement can be used to send data to another mvs jes3 node?
Define concatenating?
What is the maximum length of a single line of jcl?
Must tape dataset definitions include vol=ser specifications?