<?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: Delete temporary variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Delete-temporary-variable/m-p/552686#M153641</link>
    <description>Adding a point Symdel delete global macro variable . But I have created local macro variable. Thanks alot guys</description>
    <pubDate>Sun, 21 Apr 2019 11:04:19 GMT</pubDate>
    <dc:creator>shivagujjaru</dc:creator>
    <dc:date>2019-04-21T11:04:19Z</dc:date>
    <item>
      <title>Delete temporary variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-temporary-variable/m-p/552678#M153638</link>
      <description>&lt;P&gt;Hi guys, I need to delete a temporary variable. Created by using select distinct variable name into: variable1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I delete this variable1 from work lib .&lt;/P&gt;</description>
      <pubDate>Sun, 21 Apr 2019 10:26:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-temporary-variable/m-p/552678#M153638</guid>
      <dc:creator>shivagujjaru</dc:creator>
      <dc:date>2019-04-21T10:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Delete temporary variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-temporary-variable/m-p/552680#M153639</link>
      <description>&lt;P&gt;This is not a temporary variable (these can exist in data steps), but a macro variable (select into in SQL creates macro variables).&lt;/P&gt;
&lt;P&gt;Use the %symdel statement to remove unwanted macro variables.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Apr 2019 10:34:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-temporary-variable/m-p/552680#M153639</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-04-21T10:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Delete temporary variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-temporary-variable/m-p/552685#M153640</link>
      <description>&lt;P&gt;&lt;SPAN&gt;variable1 is a macro variable.. Google search for "delete macro variable" will give you plenty of answers&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Apr 2019 10:58:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-temporary-variable/m-p/552685#M153640</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-04-21T10:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Delete temporary variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-temporary-variable/m-p/552686#M153641</link>
      <description>Adding a point Symdel delete global macro variable . But I have created local macro variable. Thanks alot guys</description>
      <pubDate>Sun, 21 Apr 2019 11:04:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-temporary-variable/m-p/552686#M153641</guid>
      <dc:creator>shivagujjaru</dc:creator>
      <dc:date>2019-04-21T11:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Delete temporary variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-temporary-variable/m-p/552700#M153653</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/271365"&gt;@shivagujjaru&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Adding a point Symdel delete global macro variable . But I have created local macro variable. Thanks alot guys&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Why would you need to delete a local macro variable?&amp;nbsp; It will disappear when the macro finishes.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Apr 2019 14:11:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-temporary-variable/m-p/552700#M153653</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-04-21T14:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Delete temporary variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-temporary-variable/m-p/552701#M153654</link>
      <description>I have applied some loop inside the macro . It's like when file is not exits it's still using the local macro variable while checking a condition. Thanks , now it's working</description>
      <pubDate>Sun, 21 Apr 2019 14:13:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-temporary-variable/m-p/552701#M153654</guid>
      <dc:creator>shivagujjaru</dc:creator>
      <dc:date>2019-04-21T14:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Delete temporary variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-temporary-variable/m-p/552702#M153655</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/271365"&gt;@shivagujjaru&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I have applied some loop inside the macro . It's like when file is not exits it's still using the local macro variable while checking a condition. Thanks , now it's working&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;When you use INTO in PROC SQL and the query returns no observations then the macro variable is not created (or modified).&lt;/P&gt;
&lt;P&gt;Set the macro variable to a value BEFORE the query.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let list=;
select x into :list separated by ' ' from have where condition;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can also use the automatic macro variable SQLOBS to see how many observations where selected.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let n=&amp;amp;sqlobs;
%do i=1 %to &amp;amp;n;
  %let next=%scan(&amp;amp;list,&amp;amp;i,%str( ));
....&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 21 Apr 2019 14:18:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-temporary-variable/m-p/552702#M153655</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-04-21T14:18:44Z</dc:date>
    </item>
  </channel>
</rss>

