LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (December 2010, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 31 Dec 2010 16:27:06 -0500
Reply-To:   Arthur Tabachneck <art297@ROGERS.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Arthur Tabachneck <art297@ROGERS.COM>
Subject:   Re: How does SAS Handle This?
Comments:   To: Andy Arnold <awasas@COX.NET>

I agree with Jack that it might be system dependent and that you should write some test code and see exactly what your system does with it. But, more importantly, I would suggest changing the code to something that actually is both controllable and understandable.

I can't test it at the moment, but what do you get when you run the following:

data have; input a b c d; cards; 1 2 3 4 5 2 3 4 5 6 3 3 1 0 0 1 2 3 2 1 2 2 5 2 1 2 1 5 2 1 ; proc sort data=have; by a b c a d; run;

data want; set have; by a b c a d; put _all_; run;

My guess is that the value of first.a that shows up in the log won't having any value that makes any sense. Similarly, I would guess that the last.a values will be aligned with the second position in the by statement.

Art ------- On Fri, 31 Dec 2010 15:01:22 -0500, Andy Arnold <awasas@COX.NET> wrote:

>I have inherited code that looks like this... > >Proc sort data=xxx; > by a b c a d; >run; >Data yyy; > set xxx; > by a b c a d; > IF FIRST.A then do; something; end; >run; > >Which A does SAS use for the FIRST.A phrase? >Can I control which A SAS uses? > >Thanks for your help & Happy New Year. > >--Andy


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