<?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: Call Other SAS Programs Within a Single Project? in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Call-Other-SAS-Programs-Within-a-Single-Project/m-p/151928#M11884</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The %INCLUDE statement works when the programs are stored as files on the SAS server that's running the programs.&amp;nbsp; The %INCLUDE statement requires a fileref or file path that can be resolved from within the SAS session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your programs are simply embedded in the SAS Enterprise Guide project (and not saved as separate files), then you cannot programmatically reference them from other program nodes in the project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, if your programs are .SAS files referenced from your local machine, but the SAS server running them (ex: SASApp) is remote, then you cannot reference the local programs from code running on that remote server.&amp;nbsp; (Exception: if you can somehow reference your local files from the remote server using a network share...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, how can you achieve this?&amp;nbsp; Some ideas:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If the code you want to reuse can be refactored into a SAS macro, then you can submit that once at the beginning of your project and invoke it throughout within other programs.&amp;nbsp; That's the classic method for reusing SAS programming logic.&lt;/LI&gt;&lt;LI&gt;You could use a method &lt;A href="http://blogs.sas.com/content/sasdummy/2013/05/16/ftp-task-in-sas-eg/"&gt;like the Copy Files task &lt;/A&gt;to copy your SAS program from a local disk to a remote SAS folder, and then %include the resulting file from that upload location.&amp;nbsp; This would allow you to maintain the program locally, and then initiate your SAS session with the latest version as your project runs.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Feb 2015 13:10:20 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2015-02-04T13:10:20Z</dc:date>
    <item>
      <title>Call Other SAS Programs Within a Single Project?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Call-Other-SAS-Programs-Within-a-Single-Project/m-p/151926#M11882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way in Enterprise Guide to write some code to call one program from another program within the same process flow? I fully understand that we can graphically link them together so that one may come before the other, but can this be done via code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 21:32:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Call-Other-SAS-Programs-Within-a-Single-Project/m-p/151926#M11882</guid>
      <dc:creator>Zachary</dc:creator>
      <dc:date>2015-02-03T21:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Call Other SAS Programs Within a Single Project?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Call-Other-SAS-Programs-Within-a-Single-Project/m-p/151927#M11883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes. Check out the %INCLUDE statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 21:39:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Call-Other-SAS-Programs-Within-a-Single-Project/m-p/151927#M11883</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-02-03T21:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Call Other SAS Programs Within a Single Project?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Call-Other-SAS-Programs-Within-a-Single-Project/m-p/151928#M11884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The %INCLUDE statement works when the programs are stored as files on the SAS server that's running the programs.&amp;nbsp; The %INCLUDE statement requires a fileref or file path that can be resolved from within the SAS session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your programs are simply embedded in the SAS Enterprise Guide project (and not saved as separate files), then you cannot programmatically reference them from other program nodes in the project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, if your programs are .SAS files referenced from your local machine, but the SAS server running them (ex: SASApp) is remote, then you cannot reference the local programs from code running on that remote server.&amp;nbsp; (Exception: if you can somehow reference your local files from the remote server using a network share...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, how can you achieve this?&amp;nbsp; Some ideas:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If the code you want to reuse can be refactored into a SAS macro, then you can submit that once at the beginning of your project and invoke it throughout within other programs.&amp;nbsp; That's the classic method for reusing SAS programming logic.&lt;/LI&gt;&lt;LI&gt;You could use a method &lt;A href="http://blogs.sas.com/content/sasdummy/2013/05/16/ftp-task-in-sas-eg/"&gt;like the Copy Files task &lt;/A&gt;to copy your SAS program from a local disk to a remote SAS folder, and then %include the resulting file from that upload location.&amp;nbsp; This would allow you to maintain the program locally, and then initiate your SAS session with the latest version as your project runs.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2015 13:10:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Call-Other-SAS-Programs-Within-a-Single-Project/m-p/151928#M11884</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2015-02-04T13:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: Call Other SAS Programs Within a Single Project?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Call-Other-SAS-Programs-Within-a-Single-Project/m-p/151929#M11885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much. I am still very new to all of this. It seems a little counterintuitive to not have a feature of referencing files within the same project. But I especially like the suggestions you provided.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2015 17:55:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Call-Other-SAS-Programs-Within-a-Single-Project/m-p/151929#M11885</guid>
      <dc:creator>Zachary</dc:creator>
      <dc:date>2015-02-04T17:55:12Z</dc:date>
    </item>
  </channel>
</rss>

