<?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 Creating a MACRO compile source in SAS EG 8.2 in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-MACRO-compile-source-in-SAS-EG-8-2/m-p/638538#M35847</link>
    <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone let me know the error in below code,&lt;/P&gt;&lt;P&gt;I am trying to create a compile source and store it on the permanent library with below code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LIBNAME mylib '/home/sasapp1/macrlib';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;options mstored sasmstored=mylib;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%macro date / store source des='Define filenames'; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;filename file1 '&lt;SPAN class="userSuppliedValue" style="font-style: italic;"&gt;/home/sasapp1/macrlib/date.sas&lt;/SPAN&gt;'; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%mend;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RUN;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not getting any compiled code created on the mentioned path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My SAS EG is running on UNIX server&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in Advance,&lt;/P&gt;&lt;P&gt;Thalla&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Apr 2020 22:58:17 GMT</pubDate>
    <dc:creator>THALLA_REDDY</dc:creator>
    <dc:date>2020-04-08T22:58:17Z</dc:date>
    <item>
      <title>Creating a MACRO compile source in SAS EG 8.2</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-MACRO-compile-source-in-SAS-EG-8-2/m-p/638538#M35847</link>
      <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone let me know the error in below code,&lt;/P&gt;&lt;P&gt;I am trying to create a compile source and store it on the permanent library with below code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LIBNAME mylib '/home/sasapp1/macrlib';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;options mstored sasmstored=mylib;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%macro date / store source des='Define filenames'; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;filename file1 '&lt;SPAN class="userSuppliedValue" style="font-style: italic;"&gt;/home/sasapp1/macrlib/date.sas&lt;/SPAN&gt;'; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%mend;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RUN;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not getting any compiled code created on the mentioned path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My SAS EG is running on UNIX server&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in Advance,&lt;/P&gt;&lt;P&gt;Thalla&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2020 22:58:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-MACRO-compile-source-in-SAS-EG-8-2/m-p/638538#M35847</guid>
      <dc:creator>THALLA_REDDY</dc:creator>
      <dc:date>2020-04-08T22:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a MACRO compile source in SAS EG 8.2</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-MACRO-compile-source-in-SAS-EG-8-2/m-p/638553#M35848</link>
      <description>&lt;P&gt;Does your actual code have the typo?&lt;/P&gt;
&lt;PRE&gt;74    options mstored sasmstored=mylib;
                      ----------
                      13

ERROR 13-12: Unrecognized SAS option name SASMSTORED.
&lt;/PRE&gt;
&lt;P&gt;Why would you want to create a compiled macro catalog?&amp;nbsp; Why not just store the macro definitions into text files (where you can look at them with a many different tools) and use SASAUTOS facility instead?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 01:28:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-MACRO-compile-source-in-SAS-EG-8-2/m-p/638553#M35848</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-04-09T01:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a MACRO compile source in SAS EG 8.2</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-MACRO-compile-source-in-SAS-EG-8-2/m-p/638629#M35849</link>
      <description>&lt;P&gt;Do NOT store your macros in catalogs, unless you want to lose the code. Catalogs are version- and operating system-dependent, and when you realize that you can't open a catalog file, it's already too late.&lt;/P&gt;
&lt;P&gt;ALWAYS store macros as text in .sas files; use the Autocall Facility if you want the macros to be automatically loaded when used in code.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 10:18:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-MACRO-compile-source-in-SAS-EG-8-2/m-p/638629#M35849</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-04-09T10:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a MACRO compile source in SAS EG 8.2</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-MACRO-compile-source-in-SAS-EG-8-2/m-p/639196#M35857</link>
      <description>&lt;P&gt;&lt;FONT&gt;thanks for your reply,&lt;BR /&gt;Now I changed my code to use SASAUOS as below,&lt;BR /&gt;&lt;STRONG&gt;LIBNAME macrolib '/home/thallareddy/sasmacr';&lt;/STRONG&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;STRONG&gt;OPTIONS MSTORED SASMSTORE=macrolib;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;STRONG&gt;OPTIONS MAUTOSTORE SASAUTOS=('/home/thallareddy/sasmacr/DEFINE.sas',sasautos);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;STRONG&gt;OPTIONS MAUTOSTORE SASAUTOS=('/home/thallareddy/sasmacr/DATE.sas',sasautos);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;STRONG&gt;%DEFINE;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;STRONG&gt;%DATE;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;//*From here my actual program will starts and it should get the variables &amp;amp;CURRDATE, &amp;amp;M_BEG_DT....etc resolved using the above macros. *//&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;But when I am trying to run this program I am getting the &lt;/FONT&gt;&lt;FONT&gt;error log as : &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;"&lt;FONT color="#99cc00"&gt;Note:The SAS system was unable to open the macro library referenced by the SASMSTORE = libref datemacr.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT color="#99cc00"&gt;Warning: Apparent invocation of macro DEFINED not resolved&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Can you help to find where I am not doing good.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;thanks,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;thalla reddy&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Apr 2020 20:25:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-MACRO-compile-source-in-SAS-EG-8-2/m-p/639196#M35857</guid>
      <dc:creator>THALLA_REDDY</dc:creator>
      <dc:date>2020-04-11T20:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a MACRO compile source in SAS EG 8.2</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-MACRO-compile-source-in-SAS-EG-8-2/m-p/639203#M35858</link>
      <description>&lt;P&gt;The advice was to use autocall, NOT stored compiled macros.&lt;/P&gt;
&lt;P&gt;So make the following changes:&lt;/P&gt;
&lt;P&gt;1) Turn OFF the MSTORED option.&lt;/P&gt;
&lt;P&gt;2) Point the SASAUTOS option to the directory with the macro definitions.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;OPTIONS NOMSTORED MRECALL SASAUTOS=('/home/thallareddy/sasmacr/');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;3) Store the macro definitions in files with LOWERCASE names.&lt;/P&gt;
&lt;P&gt;So the %DEFINE macro would be in a file named&amp;nbsp;&lt;CODE class=" language-sas"&gt;/home/thallareddy/sasmacr/define.sas&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Apr 2020 20:56:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-MACRO-compile-source-in-SAS-EG-8-2/m-p/639203#M35858</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-04-11T20:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a MACRO compile source in SAS EG 8.2</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-MACRO-compile-source-in-SAS-EG-8-2/m-p/639441#M35859</link>
      <description>&lt;P&gt;I followed steps as you mentioned and the code is:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LIBNAME macrolib '/home/thallareddy/sasmacr';&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;STRONG&gt;OPTIONS&amp;nbsp;NOMSTORED MRECALL SASAUTOS=(MACLIB,sasautos);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;STRONG&gt;OPTIONS MAUTOSTORE SASAUTOS=('/home/thallareddy/sasmacr/define.sas',sasautos);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;STRONG&gt;OPTIONS MAUTOSTORE SASAUTOS=('/home/thallareddy/sasmacr/date.sas',sasautos);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;STRONG&gt;%DEFINE;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;STRONG&gt;%DATE;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Still I am getting the same error, "&lt;FONT color="#99cc00"&gt;Apparent invocation of Macro define is not resolved&lt;/FONT&gt;"&lt;/P&gt;&lt;P&gt;Can you please help me on this....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;thalla&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 12:08:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-MACRO-compile-source-in-SAS-EG-8-2/m-p/639441#M35859</guid>
      <dc:creator>THALLA_REDDY</dc:creator>
      <dc:date>2020-04-13T12:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a MACRO compile source in SAS EG 8.2</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-MACRO-compile-source-in-SAS-EG-8-2/m-p/639445#M35860</link>
      <description>&lt;P&gt;Remove those last two options lines as they are changing the options you wanted to set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to use the directory&amp;nbsp;as the place to find define.sas or date.sas then use either the physical path in SASAUTOS&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options sasautos=('/home/thallareddy/sasmacr' sasautos);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;or&lt;/STRONG&gt; create a fileref that points to that folder and use the fileref in the option setting. Make sure that you don't have a typo in the fileref.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename macrolib '/home/thallareddy/sasmacr';
options sasautos=(macrolib sasautos);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To test if the macro definition is actually there try compiling it explicitly by using %INCLUDE.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%include macrolib('define.sas');
%define;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If that works then you can remove the %INCLUDE statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 12:52:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-MACRO-compile-source-in-SAS-EG-8-2/m-p/639445#M35860</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-04-13T12:52:40Z</dc:date>
    </item>
  </channel>
</rss>

