LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 10 Apr 2006 14:45:54 -0400
Reply-To:     "Fehd, Ronald J" <rjf2@CDC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Fehd, Ronald J" <rjf2@CDC.GOV>
Subject:      Re: Efficiency of Proc sort with out =
Content-Type: text/plain; charset="us-ascii"

> From: Sarah Gollin > Just trying to settle an argument. My colleague believes > that it is more

> efficient

that depends on your definition of 'efficient'

> to use an out = statement on a proc sort as opposed to > overwriting the original dataset. I have googled this but > have been unable > to come up with a definite answer. Can you help?

generally it is Highly Recommended to -always- use an out= for proc Sort, most especially when you are reading from a two-level data set name

for a one-level name: i.e. work.DataX then it is not definite.

Using out= leaves your data= data set in its original order and, of course, then you have a/your copy in the order of the by variables.

you might want to subset as you sort: PROC Sort data = Lib.X(keep = ... where = (...)) out = Y; by ...;

which would be another reason that this topic would discussed under efficiency.

Ron Fehd the optimization or macro maven CDC Atlanta GA USA RJF2 at cdc dot gov

Back to: Top of message | Previous page | Main SAS-L page