**Date:** Mon, 25 Nov 2002 16:07:29 -0500
**Reply-To:** Paul McDonald <pdm@SPIKEWARE.COM>
**Sender:** "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
**From:** Paul McDonald <pdm@SPIKEWARE.COM>
**Subject:** Re: Set statement bug?
>>Paul Dorfman wrote
>><<<
>>1) Observations from the end of one or more input data sets will be
>>deleted from the output data set unless all input data sets have the
>>same number of observations.
>

It was me, and that's because in a test I ran that's what happened...

1 data a b c ;
2 do i = 1 to 10 ;
3 if i <3 then output a ;
4 if i < 6 then output b ;
5 output c ;
6 end ;
7 run ;

NOTE: The data set WORK.A has 2 observations and 1 variables.
NOTE: The data set WORK.B has 5 observations and 1 variables.
NOTE: The data set WORK.C has 10 observations and 1 variables.
NOTE: DATA statement used:
real time 0.03 seconds
cpu time 0.03 seconds

8
9 data final ;
10 set a ;
11 set b ;
12 set c ;
13 run ;

NOTE: There were 2 observations read from the data set WORK.A.
NOTE: There were 2 observations read from the data set WORK.B.
NOTE: There were 2 observations read from the data set WORK.C.
NOTE: The data set WORK.FINAL has 2 observations and 1 variables.
NOTE: DATA statement used:
real time 0.05 seconds
cpu time 0.06 seconds
2

The resulting output data set WORK.FINAL has 2 observations, which is less
than the number of observations in input data sets WORK.B and WORK.C.
That's what I meant to post, and I'm sorry it didn't come across clear.

Paul McDonald
pdm@spikeware.com
--------------------
Free SAS Training and Newsletter
http://www.spikeware.com/