How to write duplicate records into a separate dataset using
sort?
Answers were Sorted based on User's Feedback
Answer / vimal
PROC SORT DATA=data_a DUPOUT=dup_data
NODUPKEY
OUT=nodup_data;
BY x;
RUN;
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / yam
First sort the data set by the key variable and then
data dup;
set indata1;
if not(first.keyvar) then output dup;
run;
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / 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 |
What is maximum storage capability of SAS?
what is the difference between calculating the 'mean' using the mean function and proc means? : Sas programming
firstobs and obs are working only option wise,but we are using infile statement with firstobs and obs in a statement wise? so firstobs,obs working at options and statemnts or not?
How many tiers in sas architecture?
how to rearrange the data as our wish by using dataset block?
what is the primary data source for the wrs? : Sas-bi
what is study design in while working with SAS? what are screening variables in SAS?
How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data set to a second data set, and the non-matches of the right-most data set to a third data set?
What happens in the following code, if u type 8 instead of *? proc sql noprint; create table abc as select 8 from lib.abc; quit;
How to limit decimal places for the variable using proc means?
Do you need to rearrange the order of the data for the report?
what are the softwares and applications that are used most frequently used by sas bi applications developers? : Sas-bi