how do we get duplicate observations in a separate dataset?

Answer Posted / natrajboga

use the dupout= and nodupkey options in proc sort and
followed by BY statemet with list of vars

proc sort data=xxx dupout=dup_xxx nodupkey;
by var1;
run;

/* see the log window */

proc print data=dup_xxx;
run;

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how the sas basic syntax style described? : Sas-administrator

803


do you need to know if there are any missing values? : Sas programming

769


Name and describe few sas character functions that are used for data cleaning in brief.

878


what is the difference between nodup and nodupkey options? : Sas programming

866


what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming

961


Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??

2344


What do the put and input function do?

787


if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...

1150


Explain what is data step?

931


what is broad cast agent? : Sas-bi

820


What is the purpose of trailing @ and @@? How do you use them?

784


Explain the special input delimiters used in sas programming.

778


What is the difference between class statement and by statement in proc means?

896


what is PhaseIII, ODS, TLG, Macro and Proc in SAS

4131


Name validation tools used in SAS

909