This presentation will explain how to sort data by using SAS. You will also get that how to remove duplicate observation from SAS Data Sets by using nodupkey/nodup options.
2. <PROC SORT>
• Proc sort is a procedure in SAS programming language
• It sorts data in ascending or descending order
• It sorts the data based on one or more variables mentioned in the “by” statement
www.handsonsystem.com
4. NODUPKEY
“nodupkey” option is used to remove duplicate observations (row) where value of a
variable (column) listed in “by” statement is repeated.
www.handsonsystem.com
5. SYNTAX
Proc sort data=input_dataset out=sorted_dataset nodupkey;
By var;
Run;
Proc sort data=input_dataset out=sorted_dataset nodup;
By var;
Run;
Nodupke
y
Nodup
www.handsonsystem.com