<?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 Syntax Error with Macros in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Syntax-Error-with-Macros/m-p/18688#M3712</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Alisa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like Art made one more change that you didn't incorporate yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examine how he transferred the calculation to a variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;purchases as purchases&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Mar 2012 21:01:28 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2012-03-01T21:01:28Z</dc:date>
    <item>
      <title>Syntax Error with Macros</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Syntax-Error-with-Macros/m-p/18684#M3708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I am running into an issue with a program that I am trying to create.&lt;/P&gt;&lt;P&gt; The program is to sum up all of the totals for each country, use a macro to create a new column Purchases, and then produce a report that sorts all of the data descending based upon the Purchases column.&lt;/P&gt;&lt;P&gt; This is what I have so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let Purchases=sum(Total_Retail_Price); /*Total_Retail_Price is found in orion.Order_Fact*/&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt; select distinct c.Country, &amp;amp;Purchases label='Purchases'&lt;/P&gt;&lt;P&gt;&amp;nbsp; from orion.Order_Fact as o,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; orion.Customer as c&lt;/P&gt;&lt;P&gt;&amp;nbsp; where o.Customer_ID=c.Customer_ID and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; year(Order_Date)=2007&lt;/P&gt;&lt;P&gt;&amp;nbsp; having &amp;amp;Purchases&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG&gt;group by Country&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; order by &amp;amp;Purchases;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The two bolded areas are where I am getting a sytax error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code that does not perform the sort, but still works:&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;title '2007 Purchases by Country';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; select distinct c.Country,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(o.Total_Retail_Price) label='Purchases'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; into:Purchases &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from orion.Order_Fact as o,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; orion.Customer as c&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where o.Customer_ID=c.Customer_ID and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; year(Order_Date) =2007&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by Country;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone take a look at this code and let me know where I am going wrong with it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alisa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 00:42:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Syntax-Error-with-Macros/m-p/18684#M3708</guid>
      <dc:creator>InfoAlisaA</dc:creator>
      <dc:date>2012-03-01T00:42:58Z</dc:date>
    </item>
    <item>
      <title>Syntax Error with Macros</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Syntax-Error-with-Macros/m-p/18685#M3709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what you intended for your 'having' clause but, hopefully, the following will show you how you might be able to correct your code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let Purchases=sum(height); /*Total_Retail_Price is found in orion.Order_Fact*/&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select distinct c.age, &amp;amp;Purchases as purchases label='Purchases'&lt;/P&gt;&lt;P&gt;&amp;nbsp; from sashelp.class (keep=age sex weight) as o,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sashelp.class (keep=age height) as c&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; where o.age=c.age &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and sex in ('F','M')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by c.age&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; having &amp;amp;purchases &amp;gt; 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; order by calculated Purchases&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 01:03:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Syntax-Error-with-Macros/m-p/18685#M3709</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-03-01T01:03:58Z</dc:date>
    </item>
    <item>
      <title>Syntax Error with Macros</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Syntax-Error-with-Macros/m-p/18686#M3710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alisa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Art has the right idea here.&amp;nbsp; I just wanted to take the bird's-eye-view for a moment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why are you using macro language to solve this problem?&amp;nbsp; Do you need to run several different analyses, with different values for &amp;amp;PURCHASES?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to picture what the code looks like in SAS, once macro language has generated the program.&amp;nbsp; For example, you might expect to encounter problems with these clauses if you coded them without macro language:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;having&amp;nbsp; sum(Total_Retail_Price)&lt;/P&gt;&lt;P&gt;order by sum(Total_Retail_Price)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your example, that's what SAS sees.&amp;nbsp; Art has shown you what to change, to generate the proper SQL code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 17:00:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Syntax-Error-with-Macros/m-p/18686#M3710</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-03-01T17:00:39Z</dc:date>
    </item>
    <item>
      <title>Syntax Error with Macros</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Syntax-Error-with-Macros/m-p/18687#M3711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; So I modified my code to be like yours in this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let Purchases=sum(Total_Retail_Price);&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;title '2007 Purchases by Country';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; select distinct c.Country,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;Purchases label='Purchases'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from orion.Order_Fact as o,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; orion.Customer as c&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where o.Customer_ID=c.Customer_ID and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; year(Order_Date) =2007&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by c.Country&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; having &amp;amp;Purchases&amp;gt;1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; order by calculated &amp;amp;Purchases;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This unfortunately still does not work.&lt;/P&gt;&lt;P&gt;Here is the error I get from the log:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1328&amp;nbsp; %let Purchases=sum(Total_Retail_Price);&lt;/P&gt;&lt;P&gt;1329&amp;nbsp; proc sql;&lt;/P&gt;&lt;P&gt;1330&amp;nbsp; title '2007 Purchases by Country';&lt;/P&gt;&lt;P&gt;1331&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select distinct c.Country,&lt;/P&gt;&lt;P&gt;1332&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;Purchases label='Purchases'&lt;/P&gt;&lt;P&gt;1333&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from orion.Order_Fact as o,&lt;/P&gt;&lt;P&gt;1334&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; orion.Customer as c&lt;/P&gt;&lt;P&gt;1335&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where o.Customer_ID=c.Customer_ID and&lt;/P&gt;&lt;P&gt;1336&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; year(Order_Date) =2007&lt;/P&gt;&lt;P&gt;1337&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by c.Country&lt;/P&gt;&lt;P&gt;1338&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; having &amp;amp;Purchases&amp;gt;1&lt;/P&gt;&lt;P&gt;1339&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; order by calculated &amp;amp;Purchases;&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the macro variable "PURCHASES".&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(Total_Retail_Price)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, ',', -, /, &amp;lt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, GE, GET, GT, GTT, LE, LET,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LIKE, LT, LTT, NE, NET, OR, ^=, |, ||, ~=.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I am not sure I am going wrong somewhere with how I typed this in.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 20:18:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Syntax-Error-with-Macros/m-p/18687#M3711</guid>
      <dc:creator>InfoAlisaA</dc:creator>
      <dc:date>2012-03-01T20:18:52Z</dc:date>
    </item>
    <item>
      <title>Syntax Error with Macros</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Syntax-Error-with-Macros/m-p/18688#M3712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Alisa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like Art made one more change that you didn't incorporate yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examine how he transferred the calculation to a variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;purchases as purchases&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 21:01:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Syntax-Error-with-Macros/m-p/18688#M3712</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-03-01T21:01:28Z</dc:date>
    </item>
    <item>
      <title>Syntax Error with Macros</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Syntax-Error-with-Macros/m-p/18689#M3713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for pointing out where I went wrong. &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; Works like a charm now. :smileygrin:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 22:41:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Syntax-Error-with-Macros/m-p/18689#M3713</guid>
      <dc:creator>InfoAlisaA</dc:creator>
      <dc:date>2012-03-01T22:41:54Z</dc:date>
    </item>
    <item>
      <title>Syntax Error with Macros</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Syntax-Error-with-Macros/m-p/18690#M3714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Thanks once again for your help! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's my final code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let Purchases=sum(Total_Retail_Price);&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;title '2007 Purchases by Country';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; select distinct c.Country,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;Purchases as Purchases label='Purchases'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from orion.Order_Fact as o,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; orion.Customer as c&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where o.Customer_ID=c.Customer_ID and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; year(Order_Date)=2007&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by c.Country&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; having &amp;amp;Purchases&amp;gt;1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; order by calculated Purchases desc;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After Astounding pointed out my earlier booboo, everything runs fine. :smileygrin:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 22:42:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Syntax-Error-with-Macros/m-p/18690#M3714</guid>
      <dc:creator>InfoAlisaA</dc:creator>
      <dc:date>2012-03-01T22:42:46Z</dc:date>
    </item>
  </channel>
</rss>

