<?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 CONVERSION OF STRING TO NUMBER in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/CONVERSION-OF-STRING-TO-NUMBER/m-p/852438#M37449</link>
    <description>&lt;P&gt;I was trying to convert a column into numeric which was a string.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data AN;
set CUSTAVG;               
   value2=input('ANO'n,8.);     
   put value2 =;                
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But, its giving me an error.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kirito1_0-1672980422408.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79091iEC3208CCB8704DFD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kirito1_0-1672980422408.png" alt="Kirito1_0-1672980422408.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I know its a simple task but I cannot do it. Please, Help!!&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jan 2023 04:49:21 GMT</pubDate>
    <dc:creator>Kirito1</dc:creator>
    <dc:date>2023-01-06T04:49:21Z</dc:date>
    <item>
      <title>CONVERSION OF STRING TO NUMBER</title>
      <link>https://communities.sas.com/t5/New-SAS-User/CONVERSION-OF-STRING-TO-NUMBER/m-p/852438#M37449</link>
      <description>&lt;P&gt;I was trying to convert a column into numeric which was a string.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data AN;
set CUSTAVG;               
   value2=input('ANO'n,8.);     
   put value2 =;                
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But, its giving me an error.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kirito1_0-1672980422408.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79091iEC3208CCB8704DFD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kirito1_0-1672980422408.png" alt="Kirito1_0-1672980422408.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I know its a simple task but I cannot do it. Please, Help!!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 04:49:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/CONVERSION-OF-STRING-TO-NUMBER/m-p/852438#M37449</guid>
      <dc:creator>Kirito1</dc:creator>
      <dc:date>2023-01-06T04:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: CONVERSION OF STRING TO NUMBER</title>
      <link>https://communities.sas.com/t5/New-SAS-User/CONVERSION-OF-STRING-TO-NUMBER/m-p/852439#M37450</link>
      <description>&lt;P&gt;Provide the entire log of the data step, not just the error message. Also, copy the text from the log and on the forum open a text box and paste the text. The entire text is needed as we cannot tell which line of your code may have generated the error &lt;STRONG&gt;and&lt;/STRONG&gt; often the actual cause may be from an earlier statement such as missing a semicolon or unbalanced parentheses or quotes.&lt;/P&gt;
&lt;P&gt;The text box is important because the forum software will reformat text in the main message windows. The TEXT, not picture, is important as it is easier to copy/paste/edit than to retype an entire picture's worth of text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may want to run this bit code:&lt;/P&gt;
&lt;PRE&gt;Proc options option=validvarname;run;&lt;/PRE&gt;
&lt;P&gt;If the log shows this as a result:&lt;/P&gt;
&lt;PRE&gt; VALIDVARNAME=V7   Specifies the rules for valid SAS variable names that can be created and  processed during a SAS session.

&lt;/PRE&gt;
&lt;P&gt;That would mean your current session does not allow name literals like 'ANO'n. If it shows VALIDVARNAME=ANY then something else is wrong and we can't tell without more details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am curious why you think that you need to use a name literal as those are needed when your variable has characters not normally allowed in names and ANO would not need such.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 05:24:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/CONVERSION-OF-STRING-TO-NUMBER/m-p/852439#M37450</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-01-06T05:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: CONVERSION OF STRING TO NUMBER</title>
      <link>https://communities.sas.com/t5/New-SAS-User/CONVERSION-OF-STRING-TO-NUMBER/m-p/852504#M37464</link>
      <description>&lt;P&gt;Instead of posting a&amp;nbsp;&lt;EM&gt;picture&lt;/EM&gt; of the&amp;nbsp;&lt;EM&gt;log summary&lt;/EM&gt;, post the&amp;nbsp;&lt;EM&gt;complete log text&amp;nbsp;&lt;/EM&gt;by copy/pasting it into a window opened with this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54552i914D97BE1B0F21E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 14:19:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/CONVERSION-OF-STRING-TO-NUMBER/m-p/852504#M37464</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-01-06T14:19:38Z</dc:date>
    </item>
  </channel>
</rss>

