|
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
|