Example 1

 SELECT FROM(INPUT) TO(DUPS) ON(11,8,CH) ON(30,44,CH) ALLDUPS

Sorts the INPUT data set to the DUPS data set, selecting only the records from INPUT with characters in positions 11-18 and characters in positions 30-73 that occur more than once (that is, only records with duplicate ON field values).

The DUPS data set might look as follows (several records are shown for illustrative purposes):

USR002    BETTEN       12    DOC.EXAMPLES
DFSRT2    BETTEN        5    DOC.EXAMPLES
DFSRT5    BOENIG       20    MYDATA
DFSRT1    BOENIG       20    MYDATA
SYS003    BOENIG       20    MYDATA
DFSRT2    BOENIG       20    SORTST1.TEST
USR003    BOENIG       20    SORTST1.TEST
.         .            .     .
.         .            .     .
.         .            .     .