<?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: Question on  updating a existing macro variable  macro using proc SQL in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Question-on-updating-a-existing-macro-variable-macro-using-proc/m-p/163903#M31714</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response.&amp;nbsp;&amp;nbsp; I have found the reason.&lt;/P&gt;&lt;P&gt;Earlier i was using the call execute which was causing this issue. &lt;/P&gt;&lt;P&gt;DATA _NULL_ ; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set MSAFrmt.regions_list ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; call execute('%FETCH_RECORDS('||Orgnm||")");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Now instead of using the sas data step if i directly call the macro&amp;nbsp;&amp;nbsp; %FETCH_RECORDS(co)&amp;nbsp; it does not give this issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Thanks again. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Apr 2014 16:13:29 GMT</pubDate>
    <dc:creator>Smijoss</dc:creator>
    <dc:date>2014-04-02T16:13:29Z</dc:date>
    <item>
      <title>Question on  updating a existing macro variable  macro using proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-on-updating-a-existing-macro-variable-macro-using-proc/m-p/163900#M31711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an issue with a macro variable.&amp;nbsp; When i run it for first time, it runs fine ... in the 2nd run when i change the input year, it still retains the value from previous run. although i do see taht the correct row is fetched (since I have not mentioned noprint its displaying the result.)&amp;nbsp;&amp;nbsp; but the log shows the macro is still retaining a year from the prev run..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;PROC SQL ;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;SELECT TRIM(MAX(NAME)) into :Max_date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;FROM DICTIONARY.COLUMNS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;WHERE LIBNAME='WORK' AND MEMNAME = 'ADDT_LOOKUP'&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;AND substr(NAME,1,5) = "D&amp;amp;YEAR.";&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;QUIT;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2014 23:18:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-on-updating-a-existing-macro-variable-macro-using-proc/m-p/163900#M31711</guid>
      <dc:creator>Smijoss</dc:creator>
      <dc:date>2014-04-01T23:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Question on  updating a existing macro variable  macro using proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-on-updating-a-existing-macro-variable-macro-using-proc/m-p/163901#M31712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried using&amp;nbsp; %symdel and then recreate it but it does not work&amp;nbsp; &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2014 23:20:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-on-updating-a-existing-macro-variable-macro-using-proc/m-p/163901#M31712</guid>
      <dc:creator>Smijoss</dc:creator>
      <dc:date>2014-04-01T23:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Question on  updating a existing macro variable  macro using proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-on-updating-a-existing-macro-variable-macro-using-proc/m-p/163902#M31713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Post your full log with the %put statements between each call. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use option mprint and symbolgen to see what is occurring.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2014 23:27:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-on-updating-a-existing-macro-variable-macro-using-proc/m-p/163902#M31713</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-04-01T23:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: Question on  updating a existing macro variable  macro using proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-on-updating-a-existing-macro-variable-macro-using-proc/m-p/163903#M31714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response.&amp;nbsp;&amp;nbsp; I have found the reason.&lt;/P&gt;&lt;P&gt;Earlier i was using the call execute which was causing this issue. &lt;/P&gt;&lt;P&gt;DATA _NULL_ ; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set MSAFrmt.regions_list ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; call execute('%FETCH_RECORDS('||Orgnm||")");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Now instead of using the sas data step if i directly call the macro&amp;nbsp;&amp;nbsp; %FETCH_RECORDS(co)&amp;nbsp; it does not give this issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Thanks again. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 16:13:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-on-updating-a-existing-macro-variable-macro-using-proc/m-p/163903#M31714</guid>
      <dc:creator>Smijoss</dc:creator>
      <dc:date>2014-04-02T16:13:29Z</dc:date>
    </item>
  </channel>
</rss>

