<?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 issue in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-issue/m-p/460417#M117024</link>
    <description>&lt;P&gt;you have missed '.' to represent the macro variable to correctly. use the below code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; one(pc);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc means noprint data= temp;&lt;/P&gt;
&lt;P&gt;var count &amp;amp;pc._error;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;output out= &amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;pc.1&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;sum(count &amp;amp;pc._error) =&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;one&lt;/I&gt;&lt;/STRONG&gt;(income);&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 07 May 2018 13:45:12 GMT</pubDate>
    <dc:creator>Vish33</dc:creator>
    <dc:date>2018-05-07T13:45:12Z</dc:date>
    <item>
      <title>Macro issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-issue/m-p/460415#M117023</link>
      <description>&lt;P&gt;I am struggling the most simple SAS macro code.&amp;nbsp; for some reason I cannot get this the call the variable income no matter what I try (quotes, removing underscore, etc.).&amp;nbsp; here is my code.&amp;nbsp; thanks for your help.&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;options&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;symbolgen&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;mprint&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; temp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;infile&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DATALINES&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;dsd&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;missover&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; count income_error;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;CARDS&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;1, 1,&lt;/P&gt;&lt;P&gt;1, 0,&lt;/P&gt;&lt;P&gt;1, 0,&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; one(pc);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;proc means noprint data= temp;&lt;/P&gt;&lt;P&gt;var count &amp;amp;pc_error;&lt;/P&gt;&lt;P&gt;output out= &amp;amp;pc1&lt;/P&gt;&lt;P&gt;sum(count &amp;amp;pc_error) =&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;%&lt;STRONG&gt;&lt;I&gt;one&lt;/I&gt;&lt;/STRONG&gt;(income);&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 13:39:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-issue/m-p/460415#M117023</guid>
      <dc:creator>Lost_Gary</dc:creator>
      <dc:date>2018-05-07T13:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Macro issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-issue/m-p/460417#M117024</link>
      <description>&lt;P&gt;you have missed '.' to represent the macro variable to correctly. use the below code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; one(pc);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc means noprint data= temp;&lt;/P&gt;
&lt;P&gt;var count &amp;amp;pc._error;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;output out= &amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;pc.1&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;sum(count &amp;amp;pc._error) =&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;one&lt;/I&gt;&lt;/STRONG&gt;(income);&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 13:45:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-issue/m-p/460417#M117024</guid>
      <dc:creator>Vish33</dc:creator>
      <dc:date>2018-05-07T13:45:12Z</dc:date>
    </item>
  </channel>
</rss>

