HP OpenVMS Systems

ask the wizard
Content starts here

SORT/NODUPLICATES selection algorithm?

» close window

The Question is:

 
How does the sort/nodups work?  How does it handle a record in file1, file2,
 file3 with the same key?  Which of the dups records will be kept when each
 have the same key yet different data?
 


The Answer is :

 
  The mechanisms and details around the particular record retained
  during the SORT/NODUPLICATES operation are not documented.  From
  the SORT help text:
 
    "By default, Sort/Merge retains records with equal keys. The
    /NODUPLICATES qualifier eliminates all but one record with equal
    keys. The retained records may not appear in the same order as
    they appeared in the input file. If you want to specify which
    duplicate record to keep, invoke Sort at the program level and
    specify an equal-key routine."
 

answer written or last revised on ( 18-JUN-2003 )

» close window