How to write duplicate records into a separate dataset using
sort?

Answer Posted / charan araveti

if u dont want to use DUPOUT,hear is some code:

data dup(drpo temp_id);
set ds1;
retain temp_id;
if temp_id ne id then
output;
temp_id=id;

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how does sas handle missing values in a merge? : Sas programming

824


What sas features do you use to check errors and data validation?

1005


How to create list output for cross-tabulations in proc freq?

905


explain what is data set in sas? : Sas-administrator

780


What are all the problems you faced while validating tables and reports?

3276


explain the function of substr in sas? : Sas-administrator

820


What are the data types does SAS contain?

889


Difference between sum function and using “+” operator?

899


What are the default statistics that proc means produce?

833


Give some examples where proc report’s defaults are same as proc print’s defaults?

919


how could you generate test data with no input data? : Sas programming

931


what is the difference between unique key and primary key? : Sas-di

880


what is the difference between calculating the 'mean' using the mean function and proc means? : Sas programming

940


Explain proc sort?

906


How would you include common or reuse to be processed along with your statements?

2170