SAS System Options |
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 |
SORTVALIDATE | NOSORTVALIDATE |
specifies that the SORT procedure verifies if the observations in the data set are sorted by the variables specified in the BY statement.
specifies that the SORT procedure is not to verify if the observations in the data set are sorted. This is the default.
Details |
You can use the SORTVALIDATE system option to specify whether the SORT procedure validates that a data set is sorted correctly when the data set sort indicator shows a user-specified sort order. The user can specify a sort order by using the SORTEDBY= data set option in a DATA statement or by using the SORTEDBY= option in the DATASETS procedure MODIFY statement. When the sort indicator is set by a user, SAS cannot be absolutely certain that a data set is sorted according to the variables in the BY statement.
If the SORTVALIDATE system option is set and the data set sort indicator was set by a user, the SORT procedure performs a sequence check on each observation to ensure that the data set is sorted according to the variables in the BY statement. If the data set is not sorted correctly, SAS sorts the data set.
At the end of a successful sequence check or at the end of a sort, the SORT procedure sets the Validated sort information to Yes. If a sort is performed, the SORT procedure updates the Sortedby sort information to the variables that are specified in the BY statement.
If an output data set is specified, the Validated sort information in the output data set is set to Yes. If no sort is necessary, the data set is copied to the output data set.
See Also |
Data Set Option: | |||||
Procedures:
| |||||
Sorted Data Sets in SAS Language Reference: Concepts |
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.