<?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 deleting list of macro variables in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/deleting-list-of-macro-variables/m-p/145326#M38629</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I have a list of macro variables specified as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint; &lt;/P&gt;&lt;P&gt;select count(distinct date) into :Num_Dates from &amp;amp;ds1;&lt;/P&gt;&lt;P&gt;select distinct date into : Date1-:Date%left(&amp;amp;Num_Dates) &lt;/P&gt;&lt;P&gt;from &amp;amp;ds1; &lt;/P&gt;&lt;P&gt;quit; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to delete Date1 etc without having to list of all of them I normally use %symdel Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 May 2014 19:48:11 GMT</pubDate>
    <dc:creator>hdg</dc:creator>
    <dc:date>2014-05-05T19:48:11Z</dc:date>
    <item>
      <title>deleting list of macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/deleting-list-of-macro-variables/m-p/145326#M38629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I have a list of macro variables specified as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint; &lt;/P&gt;&lt;P&gt;select count(distinct date) into :Num_Dates from &amp;amp;ds1;&lt;/P&gt;&lt;P&gt;select distinct date into : Date1-:Date%left(&amp;amp;Num_Dates) &lt;/P&gt;&lt;P&gt;from &amp;amp;ds1; &lt;/P&gt;&lt;P&gt;quit; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to delete Date1 etc without having to list of all of them I normally use %symdel Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 19:48:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/deleting-list-of-macro-variables/m-p/145326#M38629</guid>
      <dc:creator>hdg</dc:creator>
      <dc:date>2014-05-05T19:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: deleting list of macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/deleting-list-of-macro-variables/m-p/145327#M38630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put your processing in a macro. All defined macro variables will&amp;nbsp; become in the scope local.&lt;/P&gt;&lt;P&gt;When the macro execution stops all local variables are deleted automatic. Nothing to bother about deleting them. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 19:58:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/deleting-list-of-macro-variables/m-p/145327#M38630</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-05-05T19:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: deleting list of macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/deleting-list-of-macro-variables/m-p/145328#M38631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes I am doing that but just wanted to know if there was a way for my own reference Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 21:23:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/deleting-list-of-macro-variables/m-p/145328#M38631</guid>
      <dc:creator>hdg</dc:creator>
      <dc:date>2014-05-05T21:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: deleting list of macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/deleting-list-of-macro-variables/m-p/145329#M38632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a dictionary view and data step view of macro variables.&amp;nbsp; You can use that to create the list of variable names you want to delete.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 21:56:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/deleting-list-of-macro-variables/m-p/145329#M38632</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-05-05T21:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: deleting list of macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/deleting-list-of-macro-variables/m-p/145330#M38633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's an approach like _null_ suggested:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: courier, monospace; font-size: 14px; text-align: -webkit-auto; background-color: #ffffff;"&gt;data _null_ ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: courier, monospace; font-size: 14px; text-align: -webkit-auto; background-color: #ffffff;"&gt;&amp;nbsp; set sashelp.vmacro ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: courier, monospace; font-size: 14px; text-align: -webkit-auto; background-color: #ffffff;"&gt;&amp;nbsp; where scope='GLOBAL' and offset=0 and name like "DATE%" ; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: courier, monospace; font-size: 14px; text-align: -webkit-auto; background-color: #ffffff;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; font-family: courier, monospace; font-size: 14px; text-align: -webkit-auto;"&gt;call execute('%nrstr(%%)symdel '||trim(left(name))||';') ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; font-family: courier, monospace; font-size: 14px; text-align: -webkit-auto;"&gt;run ;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 22:57:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/deleting-list-of-macro-variables/m-p/145330#M38633</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2014-05-05T22:57:08Z</dc:date>
    </item>
  </channel>
</rss>

