<?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: Help retrieiving lost code via macro catalog in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-retrieiving-lost-code-via-macro-catalog/m-p/905835#M357723</link>
    <description>&lt;P&gt;Do a Google search for "sas retrieve macro source code"; you might find some tips for retrieving the source code.&lt;/P&gt;</description>
    <pubDate>Sat, 02 Dec 2023 13:19:38 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2023-12-02T13:19:38Z</dc:date>
    <item>
      <title>Help retrieiving lost code via macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-retrieiving-lost-code-via-macro-catalog/m-p/905823#M357720</link>
      <description>&lt;P&gt;After days of working out some code, I had the unfortunate luck of getting the Windows blue screen of death.&amp;nbsp; This happened before I could save the SAS file.&amp;nbsp; Unfortunately, there is no saved log file either.&amp;nbsp; I can see that the SAS temporary folder is still on the drive (E:\SAS Temporary Files\_TD2656_DESKTOP-575EP3T_).&amp;nbsp; Inside I see a macro catalog (sasmac2.sas7bcat) and inside that I can see the macro I need (Doit3).&amp;nbsp; If only I could open or view the contents, it would save me a day at least.&amp;nbsp; However, when I click on it I get a pop up box that says "No Default action for the macro data type".&amp;nbsp; Is there any way to see the contents?&amp;nbsp; If not, is there any other place that SAS or Windows may have saved a temporary file which may contain the code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Base SAS 9.4 in Windows&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2023 10:09:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-retrieiving-lost-code-via-macro-catalog/m-p/905823#M357720</guid>
      <dc:creator>texasmfp</dc:creator>
      <dc:date>2023-12-02T10:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help retrieiving lost code via macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-retrieiving-lost-code-via-macro-catalog/m-p/905835#M357723</link>
      <description>&lt;P&gt;Do a Google search for "sas retrieve macro source code"; you might find some tips for retrieving the source code.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2023 13:19:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-retrieiving-lost-code-via-macro-catalog/m-p/905835#M357723</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-12-02T13:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help retrieiving lost code via macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-retrieiving-lost-code-via-macro-catalog/m-p/905836#M357724</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/296215"&gt;@texasmfp&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the code was in the &lt;EM&gt;Enhanced&lt;/EM&gt; Editor when the system crashed&amp;nbsp;&lt;EM&gt;and&lt;/EM&gt; you had the Autosave feature enabled (see&amp;nbsp;Tools → Options → Preferences… → Edit), the last saved copy should (typically) be available in&amp;nbsp;C:\Users\&lt;EM&gt;username&lt;/EM&gt;\AppData\Roaming\SAS\EnhancedEditor\Autosave of &lt;EM&gt;programname&lt;/EM&gt;.$AS, which is a text file that can be opened, e.g., with Notepad. (For the SAS-6-style &lt;EM&gt;Program&lt;/EM&gt; Editor the location&amp;nbsp;of the saved code is different, but the Autosave setting in the Preferences applies to it as well.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the&amp;nbsp;&lt;SPAN&gt;sasmac2.sas7bcat file copied into the WORK library of a new SAS session you could try&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename myref catalog 'work.sasmac2.Doit3.macro';

data _null_;
infile myref;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;but the macro statements (%IF, %DO, %END, etc.) will not be human readable. However, if you used the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/p1nypovnwon4uyn159rst8pgzqrl.htm#n1591c4dyrqwzrn19ubnnzzk0ofx" target="_blank" rel="noopener"&gt;SOURCE option&lt;/A&gt; of the %MACRO statement, the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/p0oltlodtnemugn109vxxa76sref.htm" target="_blank" rel="noopener"&gt;%COPY statement&lt;/A&gt; might come to the rescue, as suggested in&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Extracting-a-macro-code-from-Catalog-File/m-p/634946/highlight/true#M188484" target="_blank" rel="noopener"&gt;Re: Extracting a macro code from Catalog File&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Good luck!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2023 14:09:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-retrieiving-lost-code-via-macro-catalog/m-p/905836#M357724</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2023-12-02T14:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Help retrieiving lost code via macro catalog</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-retrieiving-lost-code-via-macro-catalog/m-p/905837#M357725</link>
      <description>Thanks, both the autosave and the code worked, but unfortunately neither was the latest version.  Much thanks</description>
      <pubDate>Sat, 02 Dec 2023 14:24:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-retrieiving-lost-code-via-macro-catalog/m-p/905837#M357725</guid>
      <dc:creator>texasmfp</dc:creator>
      <dc:date>2023-12-02T14:24:53Z</dc:date>
    </item>
  </channel>
</rss>

