<?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: How to display a macro definition without running it in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-display-a-macro-definition-without-running-it/m-p/354532#M82943</link>
    <description>&lt;P&gt;Basically if the macro was not created with the STORE and&amp;nbsp;SOURCE options on the %macro statement, which requires the System option&amp;nbsp; MSTORED&amp;nbsp;and a permanent library referenced in the SASMSTORE option to be set you can't.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%copy can recover the source if the macro was compiled with the option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;options  mstored SASMSTORE=fp;
%macro test666/ store source;
%put 111;
%put 222;
%mend test666;
%copy test666/ source;&lt;/PRE&gt;
&lt;P&gt;The above code sets the option mstored to allow storage, SASMSTORE=FP says that location in in MY permanent library FP. You would use your library.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The options are set on the macro state and the %copy will write this to the LOG:&lt;/P&gt;
&lt;PRE&gt; %copy test666/ source;
%macro test666/ store source;
%put 111;
%put 222;
%mend test666;
&lt;/PRE&gt;
&lt;P&gt;If the question was asked because someone did not save the source code you are basically out of luck. Note that the SAS documentation emphasizes to &lt;STRONG&gt;Save the code&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Apr 2017 16:34:13 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-04-28T16:34:13Z</dc:date>
    <item>
      <title>How to display a macro definition without running it</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-display-a-macro-definition-without-running-it/m-p/354522#M82942</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want know a stored macro definition without run it. how to do it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro test666;&lt;BR /&gt;%put 111;&lt;BR /&gt;%put 222;&lt;BR /&gt;%mend test666;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2017 16:09:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-display-a-macro-definition-without-running-it/m-p/354522#M82942</guid>
      <dc:creator>GeorgeSAS</dc:creator>
      <dc:date>2017-04-28T16:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a macro definition without running it</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-display-a-macro-definition-without-running-it/m-p/354532#M82943</link>
      <description>&lt;P&gt;Basically if the macro was not created with the STORE and&amp;nbsp;SOURCE options on the %macro statement, which requires the System option&amp;nbsp; MSTORED&amp;nbsp;and a permanent library referenced in the SASMSTORE option to be set you can't.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%copy can recover the source if the macro was compiled with the option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;options  mstored SASMSTORE=fp;
%macro test666/ store source;
%put 111;
%put 222;
%mend test666;
%copy test666/ source;&lt;/PRE&gt;
&lt;P&gt;The above code sets the option mstored to allow storage, SASMSTORE=FP says that location in in MY permanent library FP. You would use your library.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The options are set on the macro state and the %copy will write this to the LOG:&lt;/P&gt;
&lt;PRE&gt; %copy test666/ source;
%macro test666/ store source;
%put 111;
%put 222;
%mend test666;
&lt;/PRE&gt;
&lt;P&gt;If the question was asked because someone did not save the source code you are basically out of luck. Note that the SAS documentation emphasizes to &lt;STRONG&gt;Save the code&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2017 16:34:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-display-a-macro-definition-without-running-it/m-p/354532#M82943</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-28T16:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a macro definition without running it</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-display-a-macro-definition-without-running-it/m-p/354552#M82949</link>
      <description>While the option in my SAS system is :&lt;BR /&gt;NOMSTORED&lt;BR /&gt;Without changing it, what should I do then?</description>
      <pubDate>Fri, 28 Apr 2017 17:41:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-display-a-macro-definition-without-running-it/m-p/354552#M82949</guid>
      <dc:creator>GeorgeSAS</dc:creator>
      <dc:date>2017-04-28T17:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a macro definition without running it</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-display-a-macro-definition-without-running-it/m-p/354556#M82951</link>
      <description>&lt;P&gt;The example code shows everything you need to do to create the macro catalog in the library and then recover the source.&lt;/P&gt;
&lt;P&gt;The OPTIONS statement &lt;STRONG&gt;before&lt;/STRONG&gt; the %macro statement shows the details.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2017 17:51:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-display-a-macro-definition-without-running-it/m-p/354556#M82951</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-28T17:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a macro definition without running it</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-display-a-macro-definition-without-running-it/m-p/354559#M82953</link>
      <description>&lt;P&gt;How if the macro was a stored macro:&lt;BR /&gt;&lt;BR /&gt;"D:\MYSAS\sasmacro\test666.sas"&lt;BR /&gt; content of test666.sas :&lt;BR /&gt; %macro test666;&lt;BR /&gt; %put 111;&lt;BR /&gt; %put 222;&lt;BR /&gt; %mend test666;&lt;BR /&gt; &lt;BR /&gt;The option in config file: OPTIONS SASAUTOS=("D:\MYSAS\sasmacro");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case,&amp;nbsp;I want to know/display the macro definition, but I am not the author of the macro. I don't know the content.how to display the definition then?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2017 17:58:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-display-a-macro-definition-without-running-it/m-p/354559#M82953</guid>
      <dc:creator>GeorgeSAS</dc:creator>
      <dc:date>2017-04-28T17:58:12Z</dc:date>
    </item>
  </channel>
</rss>

