<?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: SAS Macro issue in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-issue/m-p/301669#M63882</link>
    <description>&lt;P&gt;There's a minor issue with your code, but not one that would generate the result you are describing. &amp;nbsp;Did you read the portion of the log that describes the results of the DATA step? &amp;nbsp;That would be the most important part.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The minor issue is that the informat $9. might read extra characters, including part of the QUANTITY value. &amp;nbsp;The solution would be to add this statement before the INPUT statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;length variety $ 9;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then the portion of the INPUT statement that reads VARIETY would become:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;input ...&amp;nbsp;@17 variety $ quantity;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My suspicion is that your DATA step contains an error, and an earlier version of FlowerSales is being used (one that does not contain SalesDate). &amp;nbsp;But you'll have to read the log to be able to tell.&lt;/P&gt;</description>
    <pubDate>Fri, 30 Sep 2016 00:34:18 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2016-09-30T00:34:18Z</dc:date>
    <item>
      <title>SAS Macro issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-issue/m-p/301667#M63881</link>
      <description>&lt;P&gt;Hello Friends&lt;/P&gt;&lt;P&gt;I am trying to run the following code, but I am not error message as&amp;nbsp; Variable SALESDATE not found in data set WORK.FLOWERSALES.&lt;/P&gt;&lt;P&gt;%LET flowertype = Ginger;&lt;BR /&gt;data flowersales;&lt;BR /&gt;input customerID $4. @6 SalesDate mmddyy10. @17 Variety $9. quantity 3.;&lt;BR /&gt;IF Variety = "&amp;amp;flowertype";&lt;BR /&gt;datalines;&lt;BR /&gt;240W 02-07-2008 Ginger 120&lt;BR /&gt;240W 02-07-2008 Protea 180&lt;BR /&gt;356W 02-08-2008 Heliconia 60&lt;BR /&gt;356W 02-08-2008 Anthurium 300&lt;BR /&gt;188R 02-11-2008 Ginger 24&lt;BR /&gt;188R 02-11-2008 Anthurium 24&lt;BR /&gt;240W 02-12-2008 Heliconia 48&lt;BR /&gt;240W 02-12-2008 Protea 48&lt;BR /&gt;356W 02-12-2008 Ginger 240&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;proc print data = flowersales;&lt;BR /&gt;format SalesDate WORDDATE18.;&lt;BR /&gt;TITLE "Sales of &amp;amp;flowertype";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is there any wrong in the code?&lt;/P&gt;&lt;P&gt;Your help is highly appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2016 00:08:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-issue/m-p/301667#M63881</guid>
      <dc:creator>sas_td2016</dc:creator>
      <dc:date>2016-09-30T00:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-issue/m-p/301669#M63882</link>
      <description>&lt;P&gt;There's a minor issue with your code, but not one that would generate the result you are describing. &amp;nbsp;Did you read the portion of the log that describes the results of the DATA step? &amp;nbsp;That would be the most important part.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The minor issue is that the informat $9. might read extra characters, including part of the QUANTITY value. &amp;nbsp;The solution would be to add this statement before the INPUT statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;length variety $ 9;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then the portion of the INPUT statement that reads VARIETY would become:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;input ...&amp;nbsp;@17 variety $ quantity;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My suspicion is that your DATA step contains an error, and an earlier version of FlowerSales is being used (one that does not contain SalesDate). &amp;nbsp;But you'll have to read the log to be able to tell.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2016 00:34:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-issue/m-p/301669#M63882</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-09-30T00:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-issue/m-p/301670#M63883</link>
      <description>&lt;P&gt;Thanks for your quick reply. &amp;nbsp;I really appreciate that.&lt;/P&gt;&lt;P&gt;As you mentioned I modified the code as below;&lt;/P&gt;&lt;P&gt;lenght Variety $9;&lt;/P&gt;&lt;P&gt;input customerID $4. @6 SalesDate mmddyy10. @17 Variety $ @28 quantity 3.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now it works. &amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2016 00:52:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-issue/m-p/301670#M63883</guid>
      <dc:creator>sas_td2016</dc:creator>
      <dc:date>2016-09-30T00:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-issue/m-p/301674#M63884</link>
      <description>&lt;P&gt;Hello my friend&lt;/P&gt;&lt;P&gt;I have made little modification on this file as below. &amp;nbsp;But I am not getting output. Am I doing something wrong here?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data flowersales;&lt;BR /&gt;infile 'C:\Users\location\Documents\My SAS Files(32)\democode\tropicalsales.txt' dlm=',';&lt;BR /&gt;length Variety $9;&lt;BR /&gt;input customerID $ SalesDate mmddyy10. &amp;nbsp;Variety $ &amp;nbsp;quantity ;&lt;BR /&gt;IF Variety = "&amp;amp;flowertype";&lt;BR /&gt;run;&lt;BR /&gt;proc print data = flowersales;&lt;BR /&gt;format SalesDate WORDDATE18.;&lt;BR /&gt;TITLE "Sales of &amp;amp;flowertype";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;240W,02-07-2008,Ginger,120&lt;BR /&gt;240W,02-07-2008,Protea,180&lt;BR /&gt;356W,02-08-2008,Heliconia,60&lt;BR /&gt;356W,02-08-2008,Anthurium,300&lt;BR /&gt;188R,02-11-2008,Ginger,24&lt;BR /&gt;188R,02-11-2008,Anthurium,24&lt;BR /&gt;240W,02-12-2008,Heliconia,48&lt;BR /&gt;240W,02-12-2008,Protea,48&lt;BR /&gt;356W,02-12-2008,Ginger,240&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2016 01:30:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-issue/m-p/301674#M63884</guid>
      <dc:creator>sas_td2016</dc:creator>
      <dc:date>2016-09-30T01:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-issue/m-p/301681#M63890</link>
      <description>&lt;P&gt;You will need to post the log from running this. &amp;nbsp;It could be anything ... like are you checking the right place to look for output? &amp;nbsp;But let's start with examining the log.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2016 03:14:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-issue/m-p/301681#M63890</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-09-30T03:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-issue/m-p/301704#M63895</link>
      <description>&lt;P&gt;Since you've marked this question solved it may be appropriate to start a new question as others won't check this thread.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2016 05:36:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-issue/m-p/301704#M63895</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-09-30T05:36:48Z</dc:date>
    </item>
  </channel>
</rss>

