z/OS DFSORT: Getting Started
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Suppressing records with duplicate control fields

z/OS DFSORT: Getting Started
SC23-6880-00

Apart from summing values, you can also use SUM to delete records with duplicate control fields (often called "duplicate records").

For example, you might want to list the publishers in ascending order, with each publisher appearing only once. If you use only the SORT statement, COR appears seven times (because seven books in the file are published by COR), FERN appears four times, VALD five times, and WETH four times.

By specifying FIELDS=NONE on the SUM statement, DFSORT writes only one record per publisher, as follows:

  SORT FIELDS=(106,4,CH,A)
  SUM FIELDS=NONE

Table 1 shows the result.

Table 1. List of Publishers, Deleting Duplicates
Book Title Publisher

1          75

106  109

LIVING WELL ON A SMALL BUDGET
COMPUTER LANGUAGES
VIDEO GAME DESIGN
COMPUTERS: AN INTRODUCTION

COR
FERN
VALD
WETH

In Using the ICETOOL utility, you will learn how to use ICETOOL's powerful SELECT, OCCUR and SPLICE operators to perform many more functions involving duplicate and non-duplicate records.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014