<?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: Weird thing happend when trying to rename SAS catalog in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Weird-thing-happend-when-trying-to-rename-SAS-catalog/m-p/902913#M356835</link>
    <description>&lt;P&gt;Is the catalog used as the location that SAS will look for compiled macros?&lt;BR /&gt;If you probably need to first disable that, probably by pointing somewhere else.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But why do you have compiled macros at all?&amp;nbsp; Using them just causes trouble, as you have discovered.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Nov 2023 03:48:17 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2023-11-14T03:48:17Z</dc:date>
    <item>
      <title>Weird thing happend when trying to rename SAS catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Weird-thing-happend-when-trying-to-rename-SAS-catalog/m-p/902911#M356833</link>
      <description>&lt;P&gt;I'm trying to rename a SAS catalog, this catalog is used to store macros and I have used "SASMSTORE=" option to change that. Well, there is an error message: This catalog is in use in DMS process.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="1.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/89719iA3238CFF0BC58D88/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I start to write some test until really weird thing happend. I write "%i_am_not_exist()"&amp;nbsp; before PROC DATASETS, the log report an error that this macro not resloved, but&amp;nbsp; the renaming program successes!&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="2.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/89721i4F6D8948C1E7278A/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.jpg" alt="2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One more troubling detail: File size of this catalog changes from 5 kb to 21 kb(I see this from SAS File Explorer), why?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do you think of that?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 03:19:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Weird-thing-happend-when-trying-to-rename-SAS-catalog/m-p/902911#M356833</guid>
      <dc:creator>whymath</dc:creator>
      <dc:date>2023-11-14T03:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Weird thing happend when trying to rename SAS catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Weird-thing-happend-when-trying-to-rename-SAS-catalog/m-p/902912#M356834</link>
      <description>&lt;P&gt;The test code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname cus "C:\Profiles\Work";
options mstored sasmstore=cus;
%macro a()/store;
  %put I am placeholder;
%mend;

option sasmstore=sasuser;
%i_am_not_exist();

proc datasets nolist lib=cus memtype=catalog;
  change Sasmacr=forms ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Nov 2023 03:33:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Weird-thing-happend-when-trying-to-rename-SAS-catalog/m-p/902912#M356834</guid>
      <dc:creator>whymath</dc:creator>
      <dc:date>2023-11-14T03:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Weird thing happend when trying to rename SAS catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Weird-thing-happend-when-trying-to-rename-SAS-catalog/m-p/902913#M356835</link>
      <description>&lt;P&gt;Is the catalog used as the location that SAS will look for compiled macros?&lt;BR /&gt;If you probably need to first disable that, probably by pointing somewhere else.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But why do you have compiled macros at all?&amp;nbsp; Using them just causes trouble, as you have discovered.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 03:48:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Weird-thing-happend-when-trying-to-rename-SAS-catalog/m-p/902913#M356835</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-11-14T03:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Weird thing happend when trying to rename SAS catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Weird-thing-happend-when-trying-to-rename-SAS-catalog/m-p/902916#M356836</link>
      <description>&lt;P&gt;That SAS continues processing even after throwing an error due to a non existing macro is just how SAS works.&lt;/P&gt;
&lt;P&gt;Add options errorabend if you want SAS to always stop processing (well... terminate the SAS session actually) if it encounters an error.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options errorabend;

libname cus "C:\temp\Work";
options mstored sasmstore=cus;
%macro a()/store;
  %put I am placeholder;
%mend;

option sasmstore=sasuser;
%i_am_not_exist();

proc datasets nolist lib=cus memtype=catalog;
  change Sasmacr=forms ;
  run;
quit;

/* clean-up to allow for re-run */
proc datasets lib=cus kill;
run;quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When running your code without option errorabend then that's what I'm getting&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1699936297198.png" style="width: 607px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/89722i43C138A73C2EE13D/image-dimensions/607x258?v=v2" width="607" height="258" role="button" title="Patrick_0-1699936297198.png" alt="Patrick_0-1699936297198.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using SAS EG I can't replicate the error you're showing:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_1-1699936357410.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/89723i6187844FA3013E04/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_1-1699936357410.png" alt="Patrick_1-1699936357410.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also can't replicate this file size growth from 5 to 21KB. In my environment the catalog is and remains 21KB from start.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And same question as Tom: Why would you want to pre-compile your macros at all? Why not just store them in a folder that's part of your SAS Autocall facility.&lt;/P&gt;
&lt;P&gt;Just store the macro definition for macro a under&amp;nbsp;C:\temp\Work\a.sas&lt;/P&gt;
&lt;P&gt;You then can add the folder at the beginning of the macro search path using syntax as below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options insert=(sasautos="C:\temp\Work");
%a();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 04:52:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Weird-thing-happend-when-trying-to-rename-SAS-catalog/m-p/902916#M356836</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-11-14T04:52:09Z</dc:date>
    </item>
  </channel>
</rss>

