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.


Tips:Sorting a sorted data

From sasCommunity
Jump to: navigation, search

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;

SUGI Paper

Submitted by Murphy Choy. Contact me at my Discussion Page.