<?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: Error while running the given program in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-while-running-the-given-program/m-p/289661#M59833</link>
    <description>&lt;BR /&gt;%macro order_internet(month, year);&lt;BR /&gt;proc print data = "/folders/myfolders/macro/order_fact.sas7bdat"; ;&lt;BR /&gt;set work.order_fact end = eof;/* named eof.. value of eof will be 1 for last iteration */&lt;BR /&gt;where month(Order_date) = &amp;amp;month and year(Order_date) = &amp;amp;year;&lt;BR /&gt;if order_type = 3 then count + 1;&lt;BR /&gt;if eof = 1 and count &amp;gt; 0 then do;&lt;BR /&gt;call symputx('title','Some Internet Orders'); call symputx('count',count); end;&lt;BR /&gt;else if eof = 1 and count = 0 then do; call symputx('title','No internet Orders'); call symputx('count',0); end;&lt;BR /&gt;run;&lt;BR /&gt;title "&amp;amp;title";&lt;BR /&gt;title2 "Total Internet Orders are &amp;amp;count";&lt;BR /&gt;proc print data = orders;&lt;BR /&gt;run;&lt;BR /&gt;%mend;&lt;BR /&gt;%order_internet(2,2007);&lt;BR /&gt;&lt;BR /&gt;I wan to run this program could you please tell me how can I assign value to set function</description>
    <pubDate>Thu, 04 Aug 2016 20:48:27 GMT</pubDate>
    <dc:creator>arun1234</dc:creator>
    <dc:date>2016-08-04T20:48:27Z</dc:date>
    <item>
      <title>Error while running the given program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-while-running-the-given-program/m-p/289643#M59829</link>
      <description>&lt;P&gt;&lt;BR /&gt;%macro ordata(month,year);&lt;BR /&gt;proc print data="/folders/myfolders/macro/order_fact.sas7bdat";&lt;/P&gt;&lt;P&gt;where month(Order_date) =&amp;amp;month and year(Order_date)=&amp;amp;year;&lt;BR /&gt;if order_type=1 then count+1;&lt;BR /&gt;run;&lt;BR /&gt;%mend;&lt;BR /&gt;%ordata(2,2007)&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 19:55:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-while-running-the-given-program/m-p/289643#M59829</guid>
      <dc:creator>arun1234</dc:creator>
      <dc:date>2016-08-04T19:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Error while running the given program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-while-running-the-given-program/m-p/289658#M59831</link>
      <description>&lt;P&gt;I'd suggest you try to debug this by getting rid of the macro language.&amp;nbsp; Just run a PROC PRINT with hard-coded values of 2 for &amp;amp;MONTH and 2007 for &amp;amp;YEAR, and see what it takes to fix up the program.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 20:43:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-while-running-the-given-program/m-p/289658#M59831</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-08-04T20:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error while running the given program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-while-running-the-given-program/m-p/289660#M59832</link>
      <description>%macro ordata(month,year);&lt;BR /&gt;proc print data="/folders/myfolders/macro/order_fact.sas7bdat";&lt;BR /&gt;where month(Order_date) =&amp;amp;month and year(Order_date)=&amp;amp;year;&lt;BR /&gt;run;&lt;BR /&gt;%mend;&lt;BR /&gt;%ordata(2,2007)&lt;BR /&gt;working perfect</description>
      <pubDate>Thu, 04 Aug 2016 20:46:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-while-running-the-given-program/m-p/289660#M59832</guid>
      <dc:creator>arun1234</dc:creator>
      <dc:date>2016-08-04T20:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error while running the given program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-while-running-the-given-program/m-p/289661#M59833</link>
      <description>&lt;BR /&gt;%macro order_internet(month, year);&lt;BR /&gt;proc print data = "/folders/myfolders/macro/order_fact.sas7bdat"; ;&lt;BR /&gt;set work.order_fact end = eof;/* named eof.. value of eof will be 1 for last iteration */&lt;BR /&gt;where month(Order_date) = &amp;amp;month and year(Order_date) = &amp;amp;year;&lt;BR /&gt;if order_type = 3 then count + 1;&lt;BR /&gt;if eof = 1 and count &amp;gt; 0 then do;&lt;BR /&gt;call symputx('title','Some Internet Orders'); call symputx('count',count); end;&lt;BR /&gt;else if eof = 1 and count = 0 then do; call symputx('title','No internet Orders'); call symputx('count',0); end;&lt;BR /&gt;run;&lt;BR /&gt;title "&amp;amp;title";&lt;BR /&gt;title2 "Total Internet Orders are &amp;amp;count";&lt;BR /&gt;proc print data = orders;&lt;BR /&gt;run;&lt;BR /&gt;%mend;&lt;BR /&gt;%order_internet(2,2007);&lt;BR /&gt;&lt;BR /&gt;I wan to run this program could you please tell me how can I assign value to set function</description>
      <pubDate>Thu, 04 Aug 2016 20:48:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-while-running-the-given-program/m-p/289661#M59833</guid>
      <dc:creator>arun1234</dc:creator>
      <dc:date>2016-08-04T20:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error while running the given program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-while-running-the-given-program/m-p/289662#M59834</link>
      <description>&lt;P&gt;Here are some basics that you will need to learn.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SET statement names the incoming SAS data set.&amp;nbsp; All you have to do is give the name of the data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first PROC PRINT should not be a PROC PRINT at all.&amp;nbsp; The statements that follow it are not allowed within a PROC PRINT.&amp;nbsp; Instead, it should probably be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data orders;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The DATA statement names the SAS data set&amp;nbsp; you would like to create, so that the second PROC PRINT can name it as the data set to be printed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once again, I would suggest you get rid of the macro language.&amp;nbsp; Get the program to work first, without a macro.&amp;nbsp; Once it works, worry about converting the program to a macro.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 21:06:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-while-running-the-given-program/m-p/289662#M59834</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-08-04T21:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error while running the given program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-while-running-the-given-program/m-p/289664#M59835</link>
      <description>&lt;P&gt;Thank you. I got your idea and i changed the format now it is working...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%macro order_internet(month, year);&lt;BR /&gt;data new;&lt;BR /&gt;set wombat.order_fact end=enof;&lt;BR /&gt;where month(Order_date) =&amp;amp;month and year(Order_date)=&amp;amp;year;&lt;BR /&gt;if order_type =3 then count +1;&lt;BR /&gt;if eof =1 and count&amp;gt;0 then do;&lt;BR /&gt;call symputx('title','Some Internet Orders'); call symputx('count',count); end;&lt;BR /&gt;else if eof = 1 and count = 0 then do; call symputx('title','No internet Orders'); call symputx('count',0); end;&lt;BR /&gt;run;&lt;BR /&gt;title "&amp;amp;title";&lt;BR /&gt;title2 "Total Internet Orders are &amp;amp;count";&lt;BR /&gt;proc print data = new;&lt;BR /&gt;run;&lt;BR /&gt;%mend;&lt;BR /&gt;%order_internet(2,2007)&lt;BR /&gt;%order_internet(4,2007)&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 21:08:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-while-running-the-given-program/m-p/289664#M59835</guid>
      <dc:creator>arun1234</dc:creator>
      <dc:date>2016-08-04T21:08:44Z</dc:date>
    </item>
  </channel>
</rss>

