Previous Page | Next Page

SAS System Options

SORTDUP= System Option



Specifies whether the SORT procedure removes duplicate variables based on all variables in a data set or the variables that remain after the DROP or KEEP data set options have been applied.
Valid in: configuration file, SAS invocation, OPTIONS statement, SAS System Options window
Category: Sort: Procedure options
PROC OPTIONS GROUP= SORT

Syntax
Syntax Description
Details
See Also

Syntax

SORTDUP=PHYSICAL | LOGICAL


Syntax Description

PHYSICAL

removes duplicates based on all the variables that are present in the data set. This is the default.

LOGICAL

removes duplicates based on only the variables remaining after the DROP= and KEEP= data set options are processed.


Details

The SORTDUP= option specifies what variables to sort to remove duplicate observations when the SORT procedure NODUPRECS option is specified.

When SORTDUP= is set to LOGICAL and NODUPRECS is specified in the SORT procedure, duplicate observations are removed based on the variables that remain after a DROP or KEEP operation on the input data set. Setting SORTDUP=LOGICAL increases the number of duplicate observations that are removed because it eliminates variables before observations are compared. Setting SORTDUP=LOGICAL might improve performance.

When SORTDUP= is set to PHYSICAL and NODUPRECS is specified in the SORT procedure, duplicate observations are removed based on all of the variables in the input data set.


See Also

The SORT Procedure in Base SAS Procedures Guide

Previous Page | Next Page | Top of Page