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


Please Help Members By Posting Answers For Below Questions

How to code these statements in JCL: CLEANUP INITIAL(NO) RESTART(NO) DYNALLOC(NO) job definition..?

1807


Name the statement which can be used to send data to another mvs jes3 node?

611


Explain the purpose of dd dummy statement?

677


when does a dataset go uncataloged?

843


What is job control language?

613






I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?

2113


What are hierarchy levels in jcl?

960


How does jcl act on code(if you take a cobol program)?

713


How do you create a temporary dataset?

668


What is timing concept in mainframe?

1664


what are the types of abends that occur on job failure? And explain the possible causes of these

1125


if the submitter of a job wants to inform another user about the job completion, how can it be done?

764


Are there any set of rules for the names of the steps used in a job? What are they?

618


in a jcl, a large volume dataset is loaded to a table using bmcload in step1 and an image copy of the loaded table is taken using bmccopy in step2. Step2 abends because the image copy dataset cannot hold the volume of the table. How can this be rectified?

824


what is DD statement is used in JCL?

686