<?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: Calling a Macro from another program - it is possible and it is useful in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Calling-a-Macro-from-another-program-it-is-possible-and-it-is/m-p/617874#M181138</link>
    <description>&lt;P&gt;If you create a program that contains a macro, there are two different ways (maybe more, actually) to use it inside another program. Let's say you have created a macro named %MYMACRO and stored the code for this macro as c:\myfolder\mymacro.sas&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Method 1: in your other program, use: %include "c:\myfolder\mymacro.sas";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Method 2:&amp;nbsp; in your other program, use: options sasautos=(sasautos "c:\myfolder");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In either case, %MYMACRO will now run your macro in the other program&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jan 2020 19:11:26 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-01-16T19:11:26Z</dc:date>
    <item>
      <title>Calling a Macro from another program - it is possible and it is useful</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calling-a-Macro-from-another-program-it-is-possible-and-it-is/m-p/617866#M181137</link>
      <description>&lt;P&gt;I am doing a Macro to deal with datas for an analysis.&lt;/P&gt;&lt;P&gt;And i have two doubts albout dealing with erros, like the data is not avalible, and others&lt;/P&gt;&lt;P&gt;1)&amp;nbsp; &amp;nbsp; &amp;nbsp;It is possible to create a Macro(functrion)&amp;nbsp; that is write in another program that is is the same process flow. How to doi it?&lt;/P&gt;&lt;P&gt;2)&amp;nbsp; &amp;nbsp; &amp;nbsp;if the first option it is true, if we have any better doing this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;T&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 18:59:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calling-a-Macro-from-another-program-it-is-possible-and-it-is/m-p/617866#M181137</guid>
      <dc:creator>ph10</dc:creator>
      <dc:date>2020-01-16T18:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a Macro from another program - it is possible and it is useful</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calling-a-Macro-from-another-program-it-is-possible-and-it-is/m-p/617874#M181138</link>
      <description>&lt;P&gt;If you create a program that contains a macro, there are two different ways (maybe more, actually) to use it inside another program. Let's say you have created a macro named %MYMACRO and stored the code for this macro as c:\myfolder\mymacro.sas&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Method 1: in your other program, use: %include "c:\myfolder\mymacro.sas";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Method 2:&amp;nbsp; in your other program, use: options sasautos=(sasautos "c:\myfolder");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In either case, %MYMACRO will now run your macro in the other program&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 19:11:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calling-a-Macro-from-another-program-it-is-possible-and-it-is/m-p/617874#M181138</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-01-16T19:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a Macro from another program - it is possible and it is useful</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calling-a-Macro-from-another-program-it-is-possible-and-it-is/m-p/617908#M181149</link>
      <description>&lt;P&gt;Hello PaigeMiler,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Thanks for the answer, but i had a problem doing the first option.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I exported the programa to&amp;nbsp;C:\Users\f8118809\Documents.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;And came this option:&lt;/P&gt;&lt;P&gt;WARNING: Physical file does not exist, /opt/sas94config_anl03/Lev1/SASApp_ANL03/C:\Users\f8118809\Documents\producao.sas.&lt;BR /&gt;ERROR: Cannot open %INCLUDE file C:\Users\f8118809\Documents\producao.sas.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 19:49:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calling-a-Macro-from-another-program-it-is-possible-and-it-is/m-p/617908#M181149</guid>
      <dc:creator>ph10</dc:creator>
      <dc:date>2020-01-16T19:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a Macro from another program - it is possible and it is useful</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calling-a-Macro-from-another-program-it-is-possible-and-it-is/m-p/617909#M181150</link>
      <description>&lt;P&gt;You have given SAS the wrong folder name and/or the wrong file name where the SAS program with the macro is located.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 19:53:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calling-a-Macro-from-another-program-it-is-possible-and-it-is/m-p/617909#M181150</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-01-16T19:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a Macro from another program - it is possible and it is useful</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calling-a-Macro-from-another-program-it-is-possible-and-it-is/m-p/617912#M181151</link>
      <description>&lt;P&gt;Looks like you're using a server. You need to have the server path for the file, not your local path.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/305468"&gt;@ph10&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello PaigeMiler,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Thanks for the answer, but i had a problem doing the first option.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I exported the programa to&amp;nbsp;C:\Users\f8118809\Documents.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;And came this option:&lt;/P&gt;
&lt;P&gt;WARNING: Physical file does not exist, /opt/sas94config_anl03/Lev1/SASApp_ANL03/C:\Users\f8118809\Documents\producao.sas.&lt;BR /&gt;ERROR: Cannot open %INCLUDE file C:\Users\f8118809\Documents\producao.sas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 19:58:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calling-a-Macro-from-another-program-it-is-possible-and-it-is/m-p/617912#M181151</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-01-16T19:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a Macro from another program - it is possible and it is useful</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calling-a-Macro-from-another-program-it-is-possible-and-it-is/m-p/617915#M181153</link>
      <description>&lt;P&gt;Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Thanks now it is working.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 20:03:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calling-a-Macro-from-another-program-it-is-possible-and-it-is/m-p/617915#M181153</guid>
      <dc:creator>ph10</dc:creator>
      <dc:date>2020-01-16T20:03:15Z</dc:date>
    </item>
  </channel>
</rss>

