This SAS code leverages the `PROC SORT` procedure to perform...
This SAS code leverages the PROC SORT
procedure to perform the following:
-
Input Dataset: It is sorting the dataset named
df_new
. -
nodupkey Option: The
nodupkey
option tells SAS to remove duplicate observations based on the variables listed in theBY
statement. If two or more observations have the same values for the variables in theBY
list, only the first occurrence is kept in the output dataset. -
Output Dataset: The sorted and deduplicated dataset is saved to a new dataset named
dataframe_sorted
. -
Sorting Variables: The dataset is sorted based on the variables specified in the
BY
statement:bi_dt
Oblgr_Nbr
Default_Ind_OblgrAbsorb
The sorting is done in ascending order by default unless specified otherwise (e.g., withdescending
).
Summary:
This code sorts the dataset df_new
by the variables bi_dt
, Oblgr_Nbr
, and Default_Ind_OblgrAbsorb
in ascending order and removes any duplicate rows having identical values for these three variables. The resulting dataset is stored in dataframe_sorted
.