<?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: macro automation help  for code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/macro-automation-help-for-code/m-p/412199#M279811</link>
    <description>&lt;P&gt;Global macro variables work throughout a session. If you declare it once, you don't need to keep redeclaring it.&lt;/P&gt;
&lt;P&gt;It helps to have it at the top of the program because it allows you to manually test things, but it's not necessary.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let dd =  %sysfunc(day(%sysfunc(today())), z2.);

%put DD = &amp;amp;dd;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 10 Nov 2017 02:24:18 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-11-10T02:24:18Z</dc:date>
    <item>
      <title>macro automation help  for code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-automation-help-for-code/m-p/412192#M279810</link>
      <description>hi one of my senior had designed a code and in every program of eg he has passed %let dd=10.&lt;BR /&gt;ie.is first two digits of todays date. as we have to open each and every program change the digit to todays date manually and run,&lt;BR /&gt;so in need help for code to pass the todays dates first two digits automatically.&lt;BR /&gt;And i dont want to open every program and dont have to pass it manually.&lt;BR /&gt;please help&lt;BR /&gt;&lt;BR /&gt;eg. if todays date is 10th nov 2017 so i have to manually enter it as %let dd=10 and this into every program.&lt;BR /&gt;so how can i automate it where i can check fo todays date and pass only two digits of system date.&lt;BR /&gt;&lt;BR /&gt;thankyou</description>
      <pubDate>Fri, 10 Nov 2017 02:00:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-automation-help-for-code/m-p/412192#M279810</guid>
      <dc:creator>anirudhs</dc:creator>
      <dc:date>2017-11-10T02:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: macro automation help  for code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-automation-help-for-code/m-p/412199#M279811</link>
      <description>&lt;P&gt;Global macro variables work throughout a session. If you declare it once, you don't need to keep redeclaring it.&lt;/P&gt;
&lt;P&gt;It helps to have it at the top of the program because it allows you to manually test things, but it's not necessary.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let dd =  %sysfunc(day(%sysfunc(today())), z2.);

%put DD = &amp;amp;dd;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Nov 2017 02:24:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-automation-help-for-code/m-p/412199#M279811</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-10T02:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: macro automation help for code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-automation-help-for-code/m-p/412201#M279812</link>
      <description>y have to use %put DD = &amp;amp;dd referencing and where.&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Nov 2017 02:30:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-automation-help-for-code/m-p/412201#M279812</guid>
      <dc:creator>anirudhs</dc:creator>
      <dc:date>2017-11-10T02:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: macro automation help for code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-automation-help-for-code/m-p/412238#M279813</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; inserted the %put just so you can see in the log which value was derived from the initial %let, and that it works as expected. That way values are also kept in the log for future reference. Aside from showing values in the log, the %put does nothing.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 08:05:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-automation-help-for-code/m-p/412238#M279813</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-11-10T08:05:45Z</dc:date>
    </item>
  </channel>
</rss>

