To all who can SORT me out,

I am curious why is this SELECT .... HIGHER(0) is not working properly 
according to documentation.

As documented (re-formatted for posting) :

"HIGHER(x) - Limits the records selected to those with ON values that occur 
more than x times (value count > x). You can use this operand to keep just 
those records with field values that occur more than x times.

    x must be specified as n or +n where n can be 0 to 99."

So, I tried HIGHER(0) operand in SELECT operator - it is not working. Any other 
values, yes, they're working 100% .


Below results in that selected records which are appearing only ONCE in INVOER 
are dropped. Selected records appearing more than once are coming out in PRINT.

//TOOLIN   DD *                                           
 SORT    FROM(INVOER) TO(TEMP0001) USING(SORT)            
 SELECT  FROM(TEMP0001) TO(TEMP0002) ON(23,8,CH) HIGHER(0) 
 DISPLAY FROM(TEMP0002) LIST(PRINT) -                     
         PAGE -                                           
         TITLE('USERS ') -      
         DATE(4MD/) -                                     
         TIME(24:) -                                      
         BLANK -                                          
         ON(01,10,CH) HEADER('DATE') -                    
         ON(11,8,CH) HEADER('TIME') -                     
         ON(23,8,CH) HEADER('USER ID') -                  
         ... etc ...
                                                          
//SORTCNTL   DD *                                         
 OPTION VLSHRT                                            
 SORT FIELDS=(23,8,CH,A)                                  
 INCLUDE COND=(01,10,CH,EQ,C'2015/04/21',AND,             
               23,03,CH,EQ,C'???',AND,                      
         ... etc ...

I had to fallback to this nice oldie: SUM FIELDS=NONE in SORTCNTL to get all 
selected records which appeared one or more times in my input.

In 'Smart DFSORT Tricks' I see this:

With SUM FIELDS=NONE and EQUALS in effect, DFSORT eliminates "duplicate 
records" by writing the first record with each key to the SORTOUT data set and 
deleting subsequent records with each key.

Very useful for me, but why not SELECT HIGHER(0) ?

Why? Please sort me out, will ya?

Groete / Greetings
Elardus Engelbrecht

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to