I'm wondering if there exists any difference between NODUPKEY and NODUPRECS options ? In my view, they seem totally the same with a BY statement.
go through this article, it explains everything step by step with examples.
https://support.sas.com/resources/papers/proceedings/proceedings/sugi30/037-30.pdf
NODUP will delete duplicated observations (records that are identical to each other) while NODUPKEY will delete those observations that have duplicate BY values (the sort BY variables that you name in PROC SORT).
Links to SAS papers can be found here
https://communities.sas.com/t5/SAS-Programming/Difference-between-NOdup-and-NoDupkey/m-p/29490#M6614...
go through this article, it explains everything step by step with examples.
https://support.sas.com/resources/papers/proceedings/proceedings/sugi30/037-30.pdf
In addition to Reeza, another person from SAS Support also said that NODUPRECS has been removed from the most recent documentation (9.4) because it works in an unexpected/unreliable way.
Instead of NODUPRECS, the current suggestion is to use NODUPKEY and to sort BY _ALL_
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.