<?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 Re: %include in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/include/m-p/185087#M265531</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like you are talking about programs and not macros.&amp;nbsp; If you were talking about macros then your syntax would look more like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Define the macro;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%include '\filepathmaindirectory\filepathsubdirectory\filename1';&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;* Call the macro ;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%filename1(option1=yes,option2=no);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;If you create your files in this way then you can use SASAUTOS.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;options insert=(sasautos='&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;\filepathmaindirectory\filepathsubdirectory&lt;/SPAN&gt;') mrecall ;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%filename1(option1=yes,option2=no);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%filename2;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%filename3;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Jul 2014 15:34:21 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2014-07-18T15:34:21Z</dc:date>
    <item>
      <title>%include</title>
      <link>https://communities.sas.com/t5/SAS-Programming/include/m-p/185085#M265529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have to run three macros; each defined by extensive pieces of code (filename1, filename2, filename3). Rather than creating one large file with everything (which makes it extremely difficult to debug), I was wandering if I could use the %include statement in a seperate macros to run my other three macros one after the other. I have the following code; could someone with more exprience with the %include statement please provide a sanity check, because this doesn't seem to be running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro MainMacro;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %include '\filepathmaindirectory\filepathsubdirectory\filename1';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %include '\filepathmaindirectory\filepathsubdirectory\filename2';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %include '\filepathmaindirectory\filepathsubdirectory\filename3';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%mend MainMacro;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%MainMacro;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions would be helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2014 15:19:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/include/m-p/185085#M265529</guid>
      <dc:creator>maroulator</dc:creator>
      <dc:date>2014-07-18T15:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: %include</title>
      <link>https://communities.sas.com/t5/SAS-Programming/include/m-p/185086#M265530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't need macros, can use %include directly, though I've always seen it include the .sas extension.&lt;/P&gt;&lt;P&gt;Something like the following should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %include '\filepathmaindirectory\filepathsubdirectory\filename1.sas';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %include '\filepathmaindirectory\filepathsubdirectory\filename2.sas';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %include '\filepathmaindirectory\filepathsubdirectory\filename3.sas';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2014 15:25:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/include/m-p/185086#M265530</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-07-18T15:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: %include</title>
      <link>https://communities.sas.com/t5/SAS-Programming/include/m-p/185087#M265531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like you are talking about programs and not macros.&amp;nbsp; If you were talking about macros then your syntax would look more like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Define the macro;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%include '\filepathmaindirectory\filepathsubdirectory\filename1';&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;* Call the macro ;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%filename1(option1=yes,option2=no);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;If you create your files in this way then you can use SASAUTOS.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;options insert=(sasautos='&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;\filepathmaindirectory\filepathsubdirectory&lt;/SPAN&gt;') mrecall ;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%filename1(option1=yes,option2=no);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%filename2;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%filename3;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2014 15:34:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/include/m-p/185087#M265531</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-07-18T15:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: %include</title>
      <link>https://communities.sas.com/t5/SAS-Programming/include/m-p/185088#M265532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can specify more than one filename in the %INCLUDE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;filename&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; myprogs &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'\filepathmaindirectory\filepathsubdirectory\'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%inc&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; myprogs(filename1 filename2 filename3) / source2;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2014 15:39:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/include/m-p/185088#M265532</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-07-18T15:39:40Z</dc:date>
    </item>
  </channel>
</rss>

