<?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 numeric values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-numeric-values/m-p/553334#M153864</link>
    <description>&lt;P&gt;What error do you get?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please show us the entire LOG file for this code (not just the error messages) by clicking on the {i} icon, and then pasting the log into the window that appears.&amp;nbsp;&lt;STRONG&gt;Do not paste the log directly into your reply, use the {i} icon.&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Apr 2019 16:22:29 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-04-23T16:22:29Z</dc:date>
    <item>
      <title>SAS macro numeric values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-numeric-values/m-p/553330#M153862</link>
      <description>&lt;P&gt;Need help !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting error while running query and %put is not printing the values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am building some counts and loading into Oracle tables' numeric fields.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL noprint;&lt;/P&gt;&lt;P&gt;Create Table output_Stats as&lt;BR /&gt;Select count(distinct(CLMS)),&lt;BR /&gt;count(CLMS),&lt;BR /&gt;count(distinct(MBRS)),&lt;BR /&gt;count(distinct(PROVS)),&lt;BR /&gt;sum(DOLLARS)&lt;BR /&gt;into&lt;BR /&gt;:&amp;amp;run_type._CLM_COUNT,&lt;BR /&gt;:&amp;amp;run_type._CLMS_COUNT,&lt;BR /&gt;:&amp;amp;run_type._MEM_COUNT,&lt;BR /&gt;:&amp;amp;run_type._PROV_COUNT,&lt;BR /&gt;:&amp;amp;run_type._DOLLARS&lt;BR /&gt;from output_x;&lt;BR /&gt;Quit;&lt;BR /&gt;&lt;BR /&gt;%put &amp;amp;=&amp;amp;&amp;amp;run_type._CLM_COUNT &amp;amp;=&amp;amp;&amp;amp;run_type._CLMS_COUNT &amp;amp;=&amp;amp;&amp;amp;run_type._MEM_COUNT &amp;amp;=&amp;amp;&amp;amp;run_type._PROV _COUNT &amp;amp;=&amp;amp;&amp;amp;run_type._DOLLARS;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Note: Oracle table fields are numeric attributes */&lt;BR /&gt;&lt;BR /&gt;%If &amp;amp;run_type = R %then&lt;BR /&gt;%do;&lt;BR /&gt;proc sql noprint;&lt;BR /&gt;update &amp;lt;Oracle_table&amp;gt;&lt;BR /&gt;set CLM_CNT = INPUT(&amp;amp;&amp;amp;run_type._CLM_COUNT.,4.) ,&amp;nbsp;&amp;nbsp;&amp;nbsp; /* i tried loading direct, but it was telling char error */&lt;BR /&gt;CLMS_CNT &amp;nbsp; = INPUT(&amp;amp;&amp;amp;run_type._CLM_LINE_COUNT.,4.) ,&lt;BR /&gt;MEM_CNT = INPUT(&amp;amp;&amp;amp;run_type._MEMBER_COUNT.,4.) ,&lt;BR /&gt;PROV_CNT&amp;nbsp; = INPUT(&amp;amp;&amp;amp;run_type._PROVIDER_COUNT.,4.)&lt;BR /&gt;where &amp;lt;condition&amp;gt;&lt;BR /&gt;;&lt;BR /&gt;Quit;&lt;BR /&gt;%end;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 16:14:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-macro-numeric-values/m-p/553330#M153862</guid>
      <dc:creator>SASAna</dc:creator>
      <dc:date>2019-04-23T16:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro numeric values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-numeric-values/m-p/553334#M153864</link>
      <description>&lt;P&gt;What error do you get?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please show us the entire LOG file for this code (not just the error messages) by clicking on the {i} icon, and then pasting the log into the window that appears.&amp;nbsp;&lt;STRONG&gt;Do not paste the log directly into your reply, use the {i} icon.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 16:22:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-macro-numeric-values/m-p/553334#M153864</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-04-23T16:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro numeric values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-numeric-values/m-p/553337#M153865</link>
      <description>&lt;PRE&gt;1)   %put is not printing the numbers.

2) log of error -

30303                      proc sql noprint;         update &amp;lt;table&amp;gt;         set 
CLM_CNT   =
30303    ! INPUT(&amp;amp;&amp;amp;run_type._CLM_COUNT.,4.) ,             
CLMS_CNT = INPUT(&amp;amp;&amp;amp;run_type._CLM_LINE_COUNT.,4.) ,
                                       _
                                       22
30303    !     MEMBER_CNT
ERROR 22-322: Syntax error, expecting one of the following: a name, *.  

SYMBOLGEN:  &amp;amp;&amp;amp; resolves to &amp;amp;.&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Apr 2019 16:26:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-macro-numeric-values/m-p/553337#M153865</guid>
      <dc:creator>SASAna</dc:creator>
      <dc:date>2019-04-23T16:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro numeric values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-numeric-values/m-p/553343#M153868</link>
      <description>&lt;P&gt;&amp;amp;&amp;amp;RUN_TYPE is never set to a value.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 16:40:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-macro-numeric-values/m-p/553343#M153868</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-04-23T16:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro numeric values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-numeric-values/m-p/553348#M153871</link>
      <description>&lt;PRE&gt;MLOGIC(code):  %IF condition &amp;amp;run_type  =  R is TRUE&lt;/PRE&gt;&lt;P&gt;run_type is resolving correctly.I pasted log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;put statements are coming as below, actual values are not printing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;amp;=R_CLM_COUNT &amp;amp;=R_CLMS_COUNT &amp;amp;=R_MEM_COUNT &amp;amp;=R_PROV_COUNT &amp;amp;=R_DOLLARS&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 16:45:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-macro-numeric-values/m-p/553348#M153871</guid>
      <dc:creator>SASAna</dc:creator>
      <dc:date>2019-04-23T16:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro numeric values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-numeric-values/m-p/553351#M153872</link>
      <description>&lt;P&gt;Can you show us the entire log, not just the area of the code where the error appears?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 16:51:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-macro-numeric-values/m-p/553351#M153872</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-04-23T16:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro numeric values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-numeric-values/m-p/553355#M153876</link>
      <description>&lt;P&gt;Have you tried using 3 ampersands ('&amp;amp;&amp;amp;&amp;amp;') for example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;CLMS_CNT = INPUT(&amp;amp;&amp;amp;&amp;amp;run_type._CLM_LINE_COUNT.,4.)&lt;/PRE&gt;&lt;P&gt;As you want &lt;FONT face="courier new,courier"&gt;run_type&lt;/FONT&gt; to resolve first then the whole macro variable needs to be resolved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 16:59:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-macro-numeric-values/m-p/553355#M153876</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2019-04-23T16:59:43Z</dc:date>
    </item>
  </channel>
</rss>

