As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.
Here are some tips for How to share your SAS knowledge with your professional network.
Difference between revisions of "Tips:Sorting a sorted data"
|Line 16:||Line 16:|
Revision as of 21:43, 24 August 2010
Sometimes, programmers have to resort their data again in order to use it for subsequent processing even though the system has detected the data as sorted. This need to resort may be due to some weird errors on the index created by the user or in a situation where SAS was not able to verify the sort done previously. This error can also occur if the data was sorted using a collating sequence different from the current one.
A possible use for the FORCE function is to achieve deduplication of certain sorted fields in data which can be found in the link below.
To address such issues, use the FORCE command in PROC SORT.
PROC SORT DATA = <data> FORCE; BY X1 X2 ... XN; RUN;
Submitted by Murphy Choy. Contact me at my Discussion Page.