<?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 find a macro using name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-macro-using-name/m-p/305042#M65023</link>
    <description>&lt;P&gt;You seem to misunderstand what the macro statement %copy does.&lt;/P&gt;
&lt;P&gt;Look at the documentation here: &lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/67912/HTML/default/viewer.htm#p0oltlodtnemugn109vxxa76sref.htm" target="_blank"&gt;%COPY Statement&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Oct 2016 10:50:28 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-10-17T10:50:28Z</dc:date>
    <item>
      <title>How to find a macro using name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-macro-using-name/m-p/305029#M65020</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;I have a SQL-code with connection to Teradata. Incide this code SAS macro - %month_diff_td. How can I view (and change) the code?&lt;/P&gt;&lt;P&gt;I use %copy&lt;/P&gt;&lt;PRE&gt;%copy MONTHS_DIFF_TD() / SOURCE;&lt;/PRE&gt;&lt;P&gt;but it doesn't help:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;FONT face="andale mono,times"&gt;&lt;STRONG&gt;&lt;I&gt;14         GOPTIONS ACCESSIBLE;
ERROR: This combination of default and specified %COPY statement options is not supported.
ERROR: An error occurred during the execution of the %COPY statement.
15         %copy MONTHS_DIFF_TD() / SOURCE;
                                _
                                180

ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&lt;FONT face="andale mono,times"&gt;&lt;STRONG&gt;&lt;I&gt;May be I can use some fing tool using macro name? &lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 10:38:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-macro-using-name/m-p/305029#M65020</guid>
      <dc:creator>IvchenkoMariya</dc:creator>
      <dc:date>2016-10-17T10:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to find a macro using name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-macro-using-name/m-p/305031#M65022</link>
      <description>&lt;P&gt;Look at the source code which created the macro? &amp;nbsp;If you don't have the source code and only have the compiled catalog then that should work, unless of course the catalog is set to protect the contents - one thing which I detest in programming. &amp;nbsp;This is why I strongly advise against the use of catalogs in any sense as the whole 32/64bit debacle has proved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Oh, and you don't specify ():&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/67912/HTML/default/viewer.htm#p0oltlodtnemugn109vxxa76sref.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/mcrolref/67912/HTML/default/viewer.htm#p0oltlodtnemugn109vxxa76sref.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Should read:&lt;/P&gt;
&lt;PRE&gt;%copy MONTHS_DIFF_TD/SOURCE;&lt;/PRE&gt;
&lt;P&gt;Assuming months_diff_td is the correct name of the macro.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 10:48:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-macro-using-name/m-p/305031#M65022</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-10-17T10:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to find a macro using name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-macro-using-name/m-p/305042#M65023</link>
      <description>&lt;P&gt;You seem to misunderstand what the macro statement %copy does.&lt;/P&gt;
&lt;P&gt;Look at the documentation here: &lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/67912/HTML/default/viewer.htm#p0oltlodtnemugn109vxxa76sref.htm" target="_blank"&gt;%COPY Statement&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 10:50:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-macro-using-name/m-p/305042#M65023</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-10-17T10:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to find a macro using name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-macro-using-name/m-p/305050#M65027</link>
      <description>&lt;P&gt;When I drop "()" I have error&lt;/P&gt;&lt;P&gt;ERROR: Macro MONTHS_DIFF_TD not found in libref MAMACRO.&lt;/P&gt;&lt;P&gt;ERROR: An error occurred during the execution of the %COPY statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Macro is exist! I found in by hands (running over all folders) &lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#000000"&gt;%macro MONTHS_DIFF_TD(date1,date2);
		cast(((&amp;amp;date2 - &amp;amp;date1) month(3)) as integer )
%mend;&lt;/FONT&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Oct 2016 11:37:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-macro-using-name/m-p/305050#M65027</guid>
      <dc:creator>IvchenkoMariya</dc:creator>
      <dc:date>2016-10-17T11:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to find a macro using name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-macro-using-name/m-p/305071#M65034</link>
      <description>&lt;P&gt;%COPY doesn't search your folders, it only works if the macro is already compiled and stored somewhere in your SAS system already.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 13:10:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-macro-using-name/m-p/305071#M65034</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-17T13:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to find a macro using name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-macro-using-name/m-p/305337#M65121</link>
      <description>Ok, Copy</description>
      <pubDate>Tue, 18 Oct 2016 12:02:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-macro-using-name/m-p/305337#M65121</guid>
      <dc:creator>IvchenkoMariya</dc:creator>
      <dc:date>2016-10-18T12:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to find a macro using name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-macro-using-name/m-p/305340#M65122</link>
      <description>&lt;P&gt;Ok, %Copy can't solve my problem. Maybe somebody know a way How to fing a macro in Explorer window&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2016 12:05:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-macro-using-name/m-p/305340#M65122</guid>
      <dc:creator>IvchenkoMariya</dc:creator>
      <dc:date>2016-10-18T12:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to find a macro using name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-macro-using-name/m-p/305346#M65125</link>
      <description>&lt;P&gt;Well&lt;/P&gt;
&lt;P&gt;- You can check your autoexec.sas (or other startup files) and see if there is an:&lt;/P&gt;
&lt;P&gt;options sasautos=...;&lt;/P&gt;
&lt;P&gt;Statement there - that is the first place SAS looks for them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Then your programs could include further ones or define them - so look at your startup files, and any other programs you run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Finally, there is the proc scaproc procedure, which does some code analyzing, you start it before your run, then after to get some results - however this might not capture everything if they are set in start programs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i suppose the question at the end of the day is why you don't know where the macros are, I mean to be able to use macros you should know something about them. &amp;nbsp;I know most don't bother, but properly developed code should have user guides, testing and such like that you should be aware of before using them, much like any software development.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2016 12:46:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-macro-using-name/m-p/305346#M65125</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-10-18T12:46:26Z</dc:date>
    </item>
  </channel>
</rss>

