<?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 variables in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/macro-variables/m-p/322713#M62035</link>
    <description>&lt;P&gt;The problem lies with &lt;FONT face="arial,helvetica,sans-serif"&gt;yoIur&lt;/FONT&gt; END_DT computations.&amp;nbsp; %SYSFUNC should be applied to INTNX, but cannot be applied to the math that attempts to subtract one:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; end_dt = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(intnx(month,&amp;amp;today,1)-1);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="times new roman,times"&gt;Instead, try:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;%let&lt;/FONT&gt; end_dt = &lt;FONT color="#993366"&gt;%eval(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%sysfunc&lt;/FONT&gt;(intnx(month,&amp;amp;today,1))&lt;FONT color="#993366"&gt;-1)&lt;/FONT&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jan 2017 16:55:35 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2017-01-05T16:55:35Z</dc:date>
    <item>
      <title>macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-variables/m-p/322710#M62034</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am trying to get the last day of the current month and 1st day of October and having a problem with "end_dt" :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: Expected close parenthesis after macro function invocation not found.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; st_dt = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(intnx(month,&amp;amp;today,-3));&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; end_dt = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(intnx(month,&amp;amp;today,1)-1);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%put&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; st_dt is &amp;amp;st_dt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%put&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; end_dt is &amp;amp;end_dt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Anyone&amp;nbsp; please?&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 16:33:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-variables/m-p/322710#M62034</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2017-01-05T16:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-variables/m-p/322713#M62035</link>
      <description>&lt;P&gt;The problem lies with &lt;FONT face="arial,helvetica,sans-serif"&gt;yoIur&lt;/FONT&gt; END_DT computations.&amp;nbsp; %SYSFUNC should be applied to INTNX, but cannot be applied to the math that attempts to subtract one:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; end_dt = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(intnx(month,&amp;amp;today,1)-1);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="times new roman,times"&gt;Instead, try:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;%let&lt;/FONT&gt; end_dt = &lt;FONT color="#993366"&gt;%eval(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%sysfunc&lt;/FONT&gt;(intnx(month,&amp;amp;today,1))&lt;FONT color="#993366"&gt;-1)&lt;/FONT&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 16:55:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-variables/m-p/322713#M62035</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-01-05T16:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-variables/m-p/322716#M62036</link>
      <description>&lt;P&gt;Function INTNX acceps alse an alignment argument:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; st_dt = &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(intnx(month,&amp;amp;today,-3&lt;STRONG&gt;,B&lt;/STRONG&gt;)); /* B = beginning, i.e day 01 */&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; end_dt = &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(intnx(month,&amp;amp;today,1&lt;STRONG&gt;,E&lt;/STRONG&gt;)); /* E = Ending - i.e. last day of the month */&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;%put&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; st_dt is &amp;amp;st_dt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;%put&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; end_dt is &amp;amp;end_dt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 16:57:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-variables/m-p/322716#M62036</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-01-05T16:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-variables/m-p/322717#M62037</link>
      <description>&lt;P&gt;i knew&amp;nbsp; it had something to do with it but just did not know&amp;nbsp; how to approach that problem. thanks Astounding!!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 17:00:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-variables/m-p/322717#M62037</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2017-01-05T17:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-variables/m-p/322723#M62039</link>
      <description>&lt;P&gt;right!&lt;/P&gt;
&lt;P&gt;i could have&amp;nbsp; used&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; end_dt1 = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(intnx(month,&amp;amp;today,0,E));&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;thanks Shmuel&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 17:09:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-variables/m-p/322723#M62039</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2017-01-05T17:09:07Z</dc:date>
    </item>
  </channel>
</rss>

