<?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: macros with proc sql in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/macros-with-proc-sql/m-p/87690#M25032</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Jan 2013 04:46:24 GMT</pubDate>
    <dc:creator>Tal</dc:creator>
    <dc:date>2013-01-28T04:46:24Z</dc:date>
    <item>
      <title>macros with proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macros-with-proc-sql/m-p/87688#M25030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all&lt;/P&gt;&lt;P&gt;i have imported&amp;nbsp; a raw file into sas and then ran several queries against the created dataset.Those queries have the current day,that same day from previous week and the week to date.I will be running the same queries every day so i think it is smart to use macro here but dont know how,i am so new to all this &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;. I have attached my code here hoping that some of you will help me &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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The date will be the only variable changing daily in my queries.So if current date is x then my queries will have x,x-7 and week_to date (x-6 to x)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would appreciate it if any of you give me some&amp;nbsp; hint on this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 01:28:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macros-with-proc-sql/m-p/87688#M25030</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2013-01-28T01:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: macros with proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macros-with-proc-sql/m-p/87689#M25031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You seem to have attached a dataset instead of code.&lt;/P&gt;&lt;P&gt;You can do what you say using macro variables.&amp;nbsp; You probably do not need to create a macro.&lt;/P&gt;&lt;P&gt;You can use the TODAY() function to get today's date.&lt;/P&gt;&lt;P&gt;%let today = %sysfunc(today());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in your queries you can reference this variable&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;where date between &amp;amp;today-6 and &amp;amp;today&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to value of the macro variable to be human readable you can make it a date literal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let today="%sysfunc(today(),date9.)"d ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 02:18:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macros-with-proc-sql/m-p/87689#M25031</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-01-28T02:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: macros with proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macros-with-proc-sql/m-p/87690#M25032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 04:46:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macros-with-proc-sql/m-p/87690#M25032</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2013-01-28T04:46:24Z</dc:date>
    </item>
  </channel>
</rss>

