DATA Step, Macro, Functions and more

proc sort question

Reply
Super Contributor
Posts: 307

proc sort question

Dear,

 

This is a simple question I just want to know if i can do this way.

I know how to get the output I need, but below code is not working when I try.  Can't i output two data sets from proc sort procedure. Thank you

proc sort data=one out=two three;
by id seq;
run;
Super User
Posts: 22,823

Re: proc sort question

Posted in reply to knveraraju91

@knveraraju91 wrote:

Can't i output two data sets from proc sort procedure. Thank you


It depends. There are multiple output options but it's not clear what you're trying to do here, sort multiple data sets at once or duplicate the same data set or identify duplicates/unique records. 

 

 

Super Contributor
Posts: 307

Re: proc sort question

Ok. Thank you. Here, I am trying for same data sets. I used dupout option for duplicates.

 

Both two and three are same datasets. 

Super User
Posts: 22,823

Re: proc sort question

Posted in reply to knveraraju91

Ok, then that's not possible within PROC SORT. 

 


@knveraraju91 wrote:

Ok. Thank you. Here, I am trying for same data sets. I used dupout option for duplicates.

 

Both two and three are same datasets. 


 

Super User
Posts: 5,825

Re: proc sort question

Posted in reply to knveraraju91

What is the use case for this requirement?

Data never sleeps
Ask a Question
Discussion stats
  • 4 replies
  • 77 views
  • 1 like
  • 3 in conversation