<?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 view macro code, without invoking? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166931#M43230</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just realized that maybe the question is, can I view the code generated by a macro without invoking it?&amp;nbsp; If this is the case, the most simplistic answer is, no.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is not the case, as Quentin said, since you are using the %include, you already have the explicit path to the macro program, so, just open if up in you preferred text editor for SAS code and take a look...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Apr 2014 16:38:15 GMT</pubDate>
    <dc:creator>FriedEgg</dc:creator>
    <dc:date>2014-04-03T16:38:15Z</dc:date>
    <item>
      <title>How view macro code, without invoking?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166927#M43226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible view a macro's code when you have the name, without invoking it? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 14:42:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166927#M43226</guid>
      <dc:creator>jammy</dc:creator>
      <dc:date>2014-04-03T14:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: How view macro code, without invoking?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166928#M43227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The method in which to view it depends upon it how it has been placed into you session.&amp;nbsp; Do you know if the macro is initialized through an autocall library or a compiled catalog, a %include statement, etc...?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 16:05:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166928#M43227</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2014-04-03T16:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: How view macro code, without invoking?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166929#M43228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it's initialized through an %include statement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 16:16:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166929#M43228</guid>
      <dc:creator>jammy</dc:creator>
      <dc:date>2014-04-03T16:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: How view macro code, without invoking?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166930#M43229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have a %include statement pointing to the source code for the macro (a .sas file)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can open that .sas file in a text editor (inlcuding a program editor).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 16:29:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166930#M43229</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2014-04-03T16:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: How view macro code, without invoking?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166931#M43230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just realized that maybe the question is, can I view the code generated by a macro without invoking it?&amp;nbsp; If this is the case, the most simplistic answer is, no.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is not the case, as Quentin said, since you are using the %include, you already have the explicit path to the macro program, so, just open if up in you preferred text editor for SAS code and take a look...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 16:38:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166931#M43230</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2014-04-03T16:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: How view macro code, without invoking?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166932#M43231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the question about a stored macro, and you know where it is stored?&amp;nbsp;&amp;nbsp; If so, there is a way to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose I created a macro called mymacro and stored it in a library in C:\macrolib.&lt;/P&gt;&lt;P&gt;In a later SAS session I want to see what code is in that macro.&lt;/P&gt;&lt;P&gt;I can do that, without invoking the macro,&amp;nbsp; by using %copy.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;options mstored sasmstore=mylib;&lt;/P&gt;&lt;P&gt;libname mylib "C:\macrolib";&lt;/P&gt;&lt;P&gt;%copy mymacro/source;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The macro code will be in the SAS&amp;nbsp; log. The macro is not invoked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 17:42:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166932#M43231</guid>
      <dc:creator>martha_sas</dc:creator>
      <dc:date>2014-04-03T17:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: How view macro code, without invoking?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166933#M43232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;there are a number of include statements which all contain macros.&amp;nbsp; I was just seeing if I could bring up the code for one instead of hunting it down!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 18:16:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166933#M43232</guid>
      <dc:creator>jammy</dc:creator>
      <dc:date>2014-04-03T18:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: How view macro code, without invoking?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166934#M43233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are using Display Manager you could convert your %include statements to dm 'include'. For example: dm "include 'c:\mymacro' "; This will bring the code into the SAS editor without running it. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 19:08:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166934#M43233</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2014-04-03T19:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: How view macro code, without invoking?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166935#M43234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could also read the catalog's macro entry, however, due to the quoting obfuscations it can get fairly messy:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%include '/path/to/MACLIB.sas';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* default work macro catalog is work.sasmacr, if you are using enterprise guide then it is sasmac1 instead, by default */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename x catalog 'work.sasmac1.YOUR MACRO NAME HERE.macro' ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;infile x;&lt;/P&gt;&lt;P&gt;input;&lt;/P&gt;&lt;P&gt;put _infile_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 18:15:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166935#M43234</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2014-04-04T18:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: How view macro code, without invoking?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166936#M43235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set the SOURCE2 option of add / SOURCE2 option to the %INCLUDE statements and you will see the macro code in the SAS log when the %INCLUDE statement runs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options source2 ;&lt;/P&gt;&lt;P&gt;%include 'mymacro.sas';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%include 'mymacro.sas' / source2 ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 21:25:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/166936#M43235</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-04-04T21:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: How view macro code, without invoking?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/543453#M74199</link>
      <description>&lt;P&gt;Could you please provide the particular syntax of %include to view the SAS Macro code in Log. I tried to locate the SAS Macro file in different ways, However could not succeed..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Library- Test123&lt;/P&gt;&lt;P&gt;Library Location ="C:\Users\jaiga\Desktop\SAS_Test_Practise\Macro"&lt;/P&gt;&lt;P&gt;Macro catalog name- SASMACR&lt;/P&gt;&lt;P&gt;Macro Name - Macro1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly provide how to locate this macro using %include syntax.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Jai&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 09:52:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/543453#M74199</guid>
      <dc:creator>jaiganesh</dc:creator>
      <dc:date>2019-03-15T09:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: How view macro code, without invoking?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/543673#M74203</link>
      <description>&lt;P&gt;I'm guessing but it is probably something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%include "C:\Users\jaiga\Desktop\SAS_Test_Practise\Macro\Macro1.sas"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can get the correct path by navigating to the folder in Windows Explorer then copying and pasting from the navigation bar at the top.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 22:09:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-view-macro-code-without-invoking/m-p/543673#M74203</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-03-15T22:09:13Z</dc:date>
    </item>
  </channel>
</rss>

