PROC SORT NODUP

Accepted Solution Solved
Reply
Super Contributor
Posts: 642
Accepted Solution

PROC SORT NODUP

i have datasets that have 30 columns. I would like clean up datasets by removing dulplicates using  _all_ and redirect the duplicate records to another dataset.

 

proc sort data=have nodupkey out=_duprecs;

by _all_;

run;

 

this code doesnt seem to do what I want.

any help on this ?


Accepted Solutions
Solution
‎05-22-2017 08:53 PM
Esteemed Advisor
Posts: 7,296

Re: PROC SORT NODUP

Is the below what you are trying to do?:

data class (drop=i);
  set sashelp.class;
  do i=1 to 5;
    output;
  end;
run;

proc sort data=class nodupkey out=dups_removed dupout=_duprecs;
  by _all_;
run;

Art, CEO, AnalystFinder.com

View solution in original post


All Replies
Solution
‎05-22-2017 08:53 PM
Esteemed Advisor
Posts: 7,296

Re: PROC SORT NODUP

Is the below what you are trying to do?:

data class (drop=i);
  set sashelp.class;
  do i=1 to 5;
    output;
  end;
run;

proc sort data=class nodupkey out=dups_removed dupout=_duprecs;
  by _all_;
run;

Art, CEO, AnalystFinder.com

Super Contributor
Posts: 642

Re: PROC SORT NODUP

Exactly!

Grand Advisor
Posts: 17,396

Re: PROC SORT NODUP

Please mark the question answered. 

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 168 views
  • 3 likes
  • 3 in conversation