<?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: Macro catalog from autocall library in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854609#M337761</link>
    <description>&lt;P&gt;Many thanks yabown, your solution works!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jan 2023 15:23:40 GMT</pubDate>
    <dc:creator>ckx</dc:creator>
    <dc:date>2023-01-19T15:23:40Z</dc:date>
    <item>
      <title>Macro catalog from autocall library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854534#M337719</link>
      <description>&lt;P&gt;I have an autocall library called "general" that I want to convert into a macro catalog. The library contains many SAS files and I don't want to modify these to add a "/ store" option as instructed by &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/n0sjezyl65z1cpn1b6mqfo8115h2.htm#n0x0f6a4xwrohan1itkodwoo2ns9" target="_self"&gt;SAS Help Center, storing macros.&lt;/A&gt; What I've tried instead is to read my macros into the current session, then save the WORK.SASMACR1 catalog to my current directory.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%include general("*.sas") / nosource2;

libname dnr "&amp;amp;_progdir";

proc catalog cat=work.sasmac1;
  copy out=dnr.sasmac1;
run;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The filename "general" has been defined by a configuration macro, &amp;amp;_progdir points to the directory containing the program.&lt;/P&gt;
&lt;P&gt;A macro catalog file "sasmac1.sas7bcat" is created and I can view the contents using&amp;nbsp; PROC CATALOG but I can't use the macros. Here's the code I'm using:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname dnr "&amp;lt;directory containing catalog&amp;gt;";

options mstored sasmstore=dnr;

/* Check the contents of the macro catalog */
proc catalog catalog = dnr.sasmac1;
  contents;
quit;

/* Try one of the macros */
%put %quotelst2(a b c);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Can anyone point me in the right direction to get this code to work or perhaps point to an alternative method to create a macro catalog from an autocall library?&lt;/P&gt;
&lt;P&gt;I'm running SAS 9.4M7 on LSAF 5.4 (this is why the macros are in WORK.SASMAC1, not SASMACR). LSAF runs SAS on Redhat Linux.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 11:16:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854534#M337719</guid>
      <dc:creator>ckx</dc:creator>
      <dc:date>2023-01-19T11:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: Macro catalog from autocall library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854562#M337732</link>
      <description>&lt;P&gt;I don't know the answer to your question, but I have an autocall library and I would like to know out of curiosity, what are the benefits of a macro catalog compared to an autocall library?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 13:18:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854562#M337732</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-01-19T13:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Macro catalog from autocall library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854576#M337743</link>
      <description>&lt;P&gt;Hi Paige,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I must say I'm not really of fan of catalogs, either for formats or for macros. In this case, I want a single file with macros from four autocall libraries that I can upload to a test version of LSAF. That would let me run my programs with minimal modifications to see how the new environment works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In case you're not familiar, LSAF stands for Life Science Analytics Framework. It's a cloud based environment geared to the pharmaceutical industry, runs SAS 9.4M7 and R 4.1.Developing programs is more or less the same as PC SAS, running production versions requires extra steps&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 13:57:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854576#M337743</guid>
      <dc:creator>ckx</dc:creator>
      <dc:date>2023-01-19T13:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Macro catalog from autocall library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854588#M337748</link>
      <description>&lt;P&gt;LSAF does not support autocall libraries? If so, that would seem to be simplest way to go.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 14:19:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854588#M337748</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-01-19T14:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Macro catalog from autocall library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854591#M337749</link>
      <description>&lt;P&gt;I'm also not a fan of macro catalogs.&amp;nbsp; That said, this paper has one approach for using a macro to read .sas files from an autocall library, copy them to a /temp location, edit the code to add /store, and then compile them all.:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.pharmasug.org/proceedings/2021/AP/PharmaSUG-2021-AP-008.pdf" target="_blank"&gt;https://www.pharmasug.org/proceedings/2021/AP/PharmaSUG-2021-AP-008.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But for your use case, if LSAF doesn't make it easy to use an autocall library, I think my next thought would be to just use OS commands to concatenate all the .sas files in my autocall libraries into a single .sas file.&amp;nbsp; Then I could push that file up to LSAF and %include it.&amp;nbsp; &amp;nbsp;It would of course be inefficient because would compile everything.&amp;nbsp; And if you have macros with the same name in different libraries they would collide. But for quick-n-dirty development, I think I'd rather have a huge .sas file with all my macro definitions than have a permanent macro catalog.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 14:36:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854591#M337749</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-01-19T14:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Macro catalog from autocall library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854592#M337750</link>
      <description>&lt;P&gt;Is the session where you create the macro catalog also SAS 9.4M7 on the same flavor of linux (same box?).&amp;nbsp; It feels like your approach should work.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On the server where you created the permanent catalog, if you create a new session and try to use the catalog, does it work?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suppose it's possible there is something 'special' about work.sasmac1 which makes a permanent copy not usable.&amp;nbsp; But that would be surprising.&amp;nbsp; More likely is that there is some difference in version/platform which is making it not work.&amp;nbsp; Since catalogs are platform-specific.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wonder if&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/35763"&gt;@yabwon&lt;/a&gt;&amp;nbsp;has played with the idea of copying work.sasmacr as a hack for making a permanent macro catalog.?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 14:45:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854592#M337750</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-01-19T14:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Macro catalog from autocall library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854594#M337752</link>
      <description>&lt;P&gt;Since you are copying:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;work.sasmac1;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it looks like you are working in SAS EG.&lt;/P&gt;
&lt;P&gt;Try to do it like that:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%include general("*.sas") / nosource2;

libname dnr "&amp;amp;_progdir";

proc catalog cat=work.sasmac1;
  copy out=dnr.sasmacr; /* &amp;lt;---------------- sasmacR instead sasmac1 */
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;All the best&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 14:59:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854594#M337752</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-01-19T14:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: Macro catalog from autocall library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854596#M337753</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To put your macros into a single file for easy transport to another system you can put them all into a package:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/yabwon/SAS_PACKAGES" target="_blank"&gt;https://github.com/yabwon/SAS_PACKAGES&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here is the "hell world" example:&amp;nbsp;&lt;A href="https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/Documentation/HelloWorldPackage.md" target="_blank"&gt;https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/Documentation/HelloWorldPackage.md&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here is presentation from SGF2021:&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=hqexaQtGw88" target="_blank"&gt;https://www.youtube.com/watch?v=hqexaQtGw88&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 14:56:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854596#M337753</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-01-19T14:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Macro catalog from autocall library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854597#M337754</link>
      <description>&lt;P&gt;I did &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 14:57:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854597#M337754</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-01-19T14:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Macro catalog from autocall library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854609#M337761</link>
      <description>&lt;P&gt;Many thanks yabown, your solution works!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 15:23:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854609#M337761</guid>
      <dc:creator>ckx</dc:creator>
      <dc:date>2023-01-19T15:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: Macro catalog from autocall library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854611#M337763</link>
      <description>&lt;P&gt;it's "yabwon", not "yabown" (I don't own a yab, whatewer "yab" is &lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":face_with_tears_of_joy:"&gt;😂&lt;/span&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 15:26:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854611#M337763</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-01-19T15:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Macro catalog from autocall library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854614#M337765</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/35763"&gt;@yabwon&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;it's "yabwon", not "yabown" (I don't own a yab, whatewer "yab" is &lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":face_with_tears_of_joy:"&gt;😂&lt;/span&gt;)&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;But what did Yab win?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 15:42:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854614#M337765</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-01-19T15:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Macro catalog from autocall library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854617#M337767</link>
      <description>&lt;P&gt;A ski.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;My last name is "Jabłoński", if you want to pronounce it (in English) witch 94% correctness/accuracy you should say: yab - won - ski&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 15:49:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854617#M337767</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-01-19T15:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Macro catalog from autocall library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854787#M337839</link>
      <description>&lt;P&gt;Sorry! &lt;span class="lia-unicode-emoji" title=":anguished_face:"&gt;😧&lt;/span&gt; I turn 65 in 3 weeks, you'd think I'd have learned to type by now!&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 10:34:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854787#M337839</guid>
      <dc:creator>ckx</dc:creator>
      <dc:date>2023-01-20T10:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Macro catalog from autocall library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854813#M337847</link>
      <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;My favourite quote for all "that" situations is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;“&lt;EM&gt;An expert is a person who has made all the mistakes that can be made in a very narrow field.&lt;/EM&gt;”&lt;/P&gt;
&lt;P&gt;― Niels Bohr&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All the best&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 12:11:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/854813#M337847</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-01-20T12:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Macro catalog from autocall library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/958581#M374118</link>
      <description>&lt;P&gt;A simple way to add the catalog to your autocall marcro library is with the options statement:&lt;/P&gt;
&lt;P&gt;filename macrocat 'path-to-the-marcro-catalog';&lt;/P&gt;
&lt;P&gt;options sasautos=(macrocat);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add this to your start up code and it will be automatically included for all sessions.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 18:03:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/958581#M374118</guid>
      <dc:creator>dr2</dc:creator>
      <dc:date>2025-02-06T18:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Macro catalog from autocall library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/958583#M374119</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/79162"&gt;@dr2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;A simple way to add the catalog to your autocall marcro library is with the options statement:&lt;/P&gt;
&lt;P&gt;filename macrocat 'path-to-the-marcro-catalog';&lt;/P&gt;
&lt;P&gt;options sasautos=(macrocat);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add this to your start up code and it will be automatically included for all sessions.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This has the drawback that any default auto-call macros are no longer available. Better would be&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options sasautos=(sasautos macrocat);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which now gives you to both the default SAS autocall macros and whatever is in macrocat. And if there are other people who want to use your autocall macros and their own autocall macros, they could do it this way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options append=(sasautos=mymacros);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This appends my autocall library to whatever their existing SASAUTOS option points to (assuming mymacros points to a valid filename location)&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 18:38:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-catalog-from-autocall-library/m-p/958583#M374119</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-02-06T18:38:49Z</dc:date>
    </item>
  </channel>
</rss>

