<?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 Global statement not supported in proc sql in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Global-statement-not-supported-in-proc-sql/m-p/152613#M11981</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use macro to do a one year forward performance track for the origination period 201202 - 201207. So if the origination month is 201202, i will track the month from 201202 to 201301 to see how origination performs. After I run the code, there is warning ' This SAS global statement is not support in proc sql' which causes my proc sql not working properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro monthly (first,last);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%do mon=&amp;amp;first &amp;amp;to &amp;amp;last;&lt;/P&gt;&lt;P&gt;%let monthend=%eval(&amp;amp;mon+99);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table test&amp;amp;mon as&lt;/P&gt;&lt;P&gt;select*&lt;/P&gt;&lt;P&gt;from aaa_&amp;amp;mon as a left join master_file&lt;/P&gt;&lt;P&gt;on num=num;&lt;/P&gt;&lt;P&gt;where &amp;amp;mon&amp;lt;=YEAR_MONTH&amp;lt;=&amp;amp;monthend;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;%mend monthly;&lt;/P&gt;&lt;P&gt;%monthly(201202,201207);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have any idea what causes the warning?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Nov 2013 02:04:13 GMT</pubDate>
    <dc:creator>zhige50</dc:creator>
    <dc:date>2013-11-22T02:04:13Z</dc:date>
    <item>
      <title>Global statement not supported in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Global-statement-not-supported-in-proc-sql/m-p/152613#M11981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use macro to do a one year forward performance track for the origination period 201202 - 201207. So if the origination month is 201202, i will track the month from 201202 to 201301 to see how origination performs. After I run the code, there is warning ' This SAS global statement is not support in proc sql' which causes my proc sql not working properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro monthly (first,last);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%do mon=&amp;amp;first &amp;amp;to &amp;amp;last;&lt;/P&gt;&lt;P&gt;%let monthend=%eval(&amp;amp;mon+99);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table test&amp;amp;mon as&lt;/P&gt;&lt;P&gt;select*&lt;/P&gt;&lt;P&gt;from aaa_&amp;amp;mon as a left join master_file&lt;/P&gt;&lt;P&gt;on num=num;&lt;/P&gt;&lt;P&gt;where &amp;amp;mon&amp;lt;=YEAR_MONTH&amp;lt;=&amp;amp;monthend;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;%mend monthly;&lt;/P&gt;&lt;P&gt;%monthly(201202,201207);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have any idea what causes the warning?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2013 02:04:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Global-statement-not-supported-in-proc-sql/m-p/152613#M11981</guid>
      <dc:creator>zhige50</dc:creator>
      <dc:date>2013-11-22T02:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Global statement not supported in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Global-statement-not-supported-in-proc-sql/m-p/152614#M11982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe the %do block is not correct, you have used &amp;amp;to instead of %to. Please check and change it to %to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also remove the semicolon after num=num; i.e., before the where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the updated code below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro monthly (first,last);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%do mon=&amp;amp;first &lt;STRONG&gt;%to&lt;/STRONG&gt; &amp;amp;last;&lt;/P&gt;&lt;P&gt;%let monthend=%eval(&amp;amp;mon+99);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table test&amp;amp;mon as&lt;/P&gt;&lt;P&gt;select*&lt;/P&gt;&lt;P&gt;from aaa_&amp;amp;mon as a left join master_file &lt;STRONG&gt;as b&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;on &lt;STRONG&gt;a.num=b.num&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;where &amp;amp;mon&amp;lt;=YEAR_MONTH&amp;lt;=&amp;amp;monthend;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;%mend monthly;&lt;/P&gt;&lt;P&gt;%monthly(201202,201207);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jagadish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2013 02:29:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Global-statement-not-supported-in-proc-sql/m-p/152614#M11982</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2013-11-22T02:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Global statement not supported in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Global-statement-not-supported-in-proc-sql/m-p/152615#M11983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much. It works now!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2013 04:09:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Global-statement-not-supported-in-proc-sql/m-p/152615#M11983</guid>
      <dc:creator>zhige50</dc:creator>
      <dc:date>2013-11-22T04:09:08Z</dc:date>
    </item>
  </channel>
</rss>

