<?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 SAS let statement defines the variable as character or numeric in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-let-statement-defines-the-variable-as-character-or-numeric/m-p/135875#M1249</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I write:&lt;/P&gt;&lt;P&gt;%let x = 0.32;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I make sure that x is initialized as a numeric variable and not a character variable? I want to be able to do numerical operations on x.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jul 2014 18:00:03 GMT</pubDate>
    <dc:creator>eagles_dare13</dc:creator>
    <dc:date>2014-07-24T18:00:03Z</dc:date>
    <item>
      <title>SAS let statement defines the variable as character or numeric</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-let-statement-defines-the-variable-as-character-or-numeric/m-p/135875#M1249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I write:&lt;/P&gt;&lt;P&gt;%let x = 0.32;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I make sure that x is initialized as a numeric variable and not a character variable? I want to be able to do numerical operations on x.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 18:00:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAS-let-statement-defines-the-variable-as-character-or-numeric/m-p/135875#M1249</guid>
      <dc:creator>eagles_dare13</dc:creator>
      <dc:date>2014-07-24T18:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAS let statement defines the variable as character or numeric</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-let-statement-defines-the-variable-as-character-or-numeric/m-p/135876#M1250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;macro variables are always text based as the goal is modify the sas source code.&lt;/P&gt;&lt;P&gt;In normal situations numerical calculations are exceptional in a sas macro as they are processed within a sas-datastep. &lt;/P&gt;&lt;P&gt;Are you sure you are not mixing up some goals of the several different coding languages within a SAS environment?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 18:08:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAS-let-statement-defines-the-variable-as-character-or-numeric/m-p/135876#M1250</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-07-24T18:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAS let statement defines the variable as character or numeric</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-let-statement-defines-the-variable-as-character-or-numeric/m-p/135877#M1251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can perform numerical calcuations to create additional MACRO variable values using the %sysfunc or %eval&amp;lt;integers only&amp;gt; or %sysevalf.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;%let x = 0.32; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let y = %sysevalf(&amp;amp;x * 6.2); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let z = %sysfunc( max(&amp;amp;x,&amp;amp;y,23)); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put y= &amp;amp;y z= &amp;amp;z; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the idea is to do numeric operations in a data step then your X variable would be treated and used as a constant value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 18:52:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAS-let-statement-defines-the-variable-as-character-or-numeric/m-p/135877#M1251</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-07-24T18:52:41Z</dc:date>
    </item>
  </channel>
</rss>

