<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Spool Option and Include Statement in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Spool-Option-and-Include-Statement/m-p/70359#M20239</link>
    <description>Good Afternoon,&lt;BR /&gt;
&lt;BR /&gt;
I have recently stumbled over using the Spool Option in tandem with the Include statement which would assist in reducing the amount of code I have.  An example of what I have is below.&lt;BR /&gt;
&lt;BR /&gt;
OPTIONS SPOOL;&lt;BR /&gt;
&lt;BR /&gt;
DATA TEST;&lt;BR /&gt;
SET SASHELP.CLNMSG;&lt;BR /&gt;
WHERE LEVEL = "N";&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
DATA TEST1;&lt;BR /&gt;
%INC 4:5;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
It appears very simpe, but I get nothing in dataset TEST1.&lt;BR /&gt;
&lt;BR /&gt;
Does anyone have an idea about what I am doing wrong?  I have trawled the internet, but can't find anything of use. &lt;BR /&gt;
&lt;BR /&gt;
Your help is greatly appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Scott</description>
    <pubDate>Thu, 10 Sep 2009 03:01:27 GMT</pubDate>
    <dc:creator>Scottcom4</dc:creator>
    <dc:date>2009-09-10T03:01:27Z</dc:date>
    <item>
      <title>Spool Option and Include Statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Spool-Option-and-Include-Statement/m-p/70359#M20239</link>
      <description>Good Afternoon,&lt;BR /&gt;
&lt;BR /&gt;
I have recently stumbled over using the Spool Option in tandem with the Include statement which would assist in reducing the amount of code I have.  An example of what I have is below.&lt;BR /&gt;
&lt;BR /&gt;
OPTIONS SPOOL;&lt;BR /&gt;
&lt;BR /&gt;
DATA TEST;&lt;BR /&gt;
SET SASHELP.CLNMSG;&lt;BR /&gt;
WHERE LEVEL = "N";&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
DATA TEST1;&lt;BR /&gt;
%INC 4:5;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
It appears very simpe, but I get nothing in dataset TEST1.&lt;BR /&gt;
&lt;BR /&gt;
Does anyone have an idea about what I am doing wrong?  I have trawled the internet, but can't find anything of use. &lt;BR /&gt;
&lt;BR /&gt;
Your help is greatly appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Scott</description>
      <pubDate>Thu, 10 Sep 2009 03:01:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Spool-Option-and-Include-Statement/m-p/70359#M20239</guid>
      <dc:creator>Scottcom4</dc:creator>
      <dc:date>2009-09-10T03:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Spool Option and Include Statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Spool-Option-and-Include-Statement/m-p/70360#M20240</link>
      <description>Hi:&lt;BR /&gt;
  Here's the doc:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/61724/HTML/default/a000218370.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/61724/HTML/default/a000218370.htm&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
  The difference between your example and the example in the doc is that they do not show the included code from one data step program inside a second (different) data step program. You might wish to work with Tech Support on this question. &lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 10 Sep 2009 04:29:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Spool-Option-and-Include-Statement/m-p/70360#M20240</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-09-10T04:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Spool Option and Include Statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Spool-Option-and-Include-Statement/m-p/70361#M20241</link>
      <description>Run your program in BATCH.  It appears that %INC line numbers is not supported in Windows DMS where I tested it.  As I recall INCing line number ranges was originally for interactive line mode SAS sessions, where it is a sort of poor mans recall. &lt;BR /&gt;
&lt;BR /&gt;
It also appears that interactive line mode is not supported in windows os.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
NOTE: This session is executing on the WIN_PRO  platform.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
NOTE: SAS 9.1.3 Service Pack 4&lt;BR /&gt;
&lt;BR /&gt;
NOTE: SAS initialization used:&lt;BR /&gt;
      real time           0.25 seconds&lt;BR /&gt;
      cpu time            0.09 seconds&lt;BR /&gt;
      &lt;BR /&gt;
1          OPTIONS SPOOL;&lt;BR /&gt;
2          &lt;BR /&gt;
3          DATA TEST;&lt;BR /&gt;
4          SET SASHELP.CLNMSG;&lt;BR /&gt;
5          WHERE LEVEL = "N";&lt;BR /&gt;
6          RUN;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: There were 160 observations read from the data set SASHELP.CLNMSG.&lt;BR /&gt;
      WHERE LEVEL='N';&lt;BR /&gt;
NOTE: The data set WORK.TEST has 160 observations and 6 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.00 seconds&lt;BR /&gt;
      cpu time            0.01 seconds&lt;BR /&gt;
      &lt;BR /&gt;
&lt;BR /&gt;
7          &lt;BR /&gt;
8          DATA TEST1;&lt;BR /&gt;
9             %inc 4:5 / source2;&lt;BR /&gt;
NOTE: %INCLUDE (level 1) previous line numbers.&lt;BR /&gt;
10        +SET SASHELP.CLNMSG;&lt;BR /&gt;
11        +WHERE LEVEL = "N";&lt;BR /&gt;
NOTE: %INCLUDE (level 1) ending.&lt;BR /&gt;
12         RUN;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: There were 160 observations read from the data set SASHELP.CLNMSG.&lt;BR /&gt;
      WHERE LEVEL='N';&lt;BR /&gt;
NOTE: The data set WORK.TEST1 has 160 observations and 6 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.00 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
      &lt;BR /&gt;
&lt;BR /&gt;
&amp;#12;2                                        The SAS System       06:07 Thursday, September 10, 2009&lt;BR /&gt;
&lt;BR /&gt;
  1 OPTIONS SPOOL;&lt;BR /&gt;
  2 &lt;BR /&gt;
  3 DATA TEST;&lt;BR /&gt;
  4 SET SASHELP.CLNMSG;&lt;BR /&gt;
  5 WHERE LEVEL = "N";&lt;BR /&gt;
  6 RUN;&lt;BR /&gt;
  7 &lt;BR /&gt;
  8 DATA TEST1;&lt;BR /&gt;
  9    %inc 4:5 / source2;&lt;BR /&gt;
  10 SET SASHELP.CLNMSG;&lt;BR /&gt;
  11 WHERE LEVEL = "N";&lt;BR /&gt;
  12 RUN;&lt;BR /&gt;
  13 &lt;BR /&gt;
  14 %list 1:20;&lt;BR /&gt;
13         &lt;BR /&gt;
14         %list 1:20;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414&lt;BR /&gt;
NOTE: The SAS System used:&lt;BR /&gt;
      real time           0.26 seconds&lt;BR /&gt;
      cpu time            0.10 seconds&lt;BR /&gt;
[/pre]</description>
      <pubDate>Thu, 10 Sep 2009 11:12:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Spool-Option-and-Include-Statement/m-p/70361#M20241</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2009-09-10T11:12:34Z</dc:date>
    </item>
  </channel>
</rss>

