|Date: ||Thu, 31 May 2007 09:39:00 -0400|
|Reply-To: ||Matt Pettis <matt.pettis@THOMSON.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Matt Pettis <matt.pettis@THOMSON.COM>|
|Subject: ||Re: Please give the explanation of this.....|
The data step writes data to the dataset named on the 'data' line when
either a) it encounters and executes an 'output' statement, or b) it hits
the bottom of the datastep (which is the 'run' statement here).
both 'do' loops spin around inside of the datastep, incrementing x,
WITHOUT encountering an 'output' statement. When the code finally hits
the 'run' statement after executing 'x + 1' 60 times (or so -- i may have
a 1-off error), it outputs that value of x. since there is no 'set'
or 'infile' statement to make this step start executing for a second time,
That's how you get only one observation. Make sense?
On Thu, 31 May 2007 04:34:31 -0700, Naren <narendra.palmure@GMAIL.COM>
>do year = 1 to 5;
>do month = 1 to 12;
>x + 1;
>Which one of the following represents how many observations are
>written to the WORK.SALES data set?
>Please give me the explanation of this problem...