<?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: converting char to numeric variable in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/converting-char-to-numeric-variable/m-p/391058#M3328</link>
    <description>&lt;P&gt;I believe there is a correction required in the rename option, no comma is required to rename two or more variables. Please try the updated code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data carz;
set work.import(rename= (MSRP = MSRP1 Invoice = Invoice1));
MSRP = input(MSRP1, dollar12.);
Invoice = input(Invoice1, dollar12.);
format Invoice MSRP  Dollar12.;
drop MSRP1 Invoice1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 26 Aug 2017 10:31:37 GMT</pubDate>
    <dc:creator>Jagadishkatam</dc:creator>
    <dc:date>2017-08-26T10:31:37Z</dc:date>
    <item>
      <title>converting char to numeric variable</title>
      <link>https://communities.sas.com/t5/SAS-Studio/converting-char-to-numeric-variable/m-p/391056#M3327</link>
      <description>&lt;P&gt;here i want to change the variable from char to numeric so i used input and i gave the format as well and i want to get the simplest way to create it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code :-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data carz;&lt;BR /&gt;set work.import&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;(rename= (MSRP = MSRP1,Invoice = Invoice1));&lt;/FONT&gt;&lt;BR /&gt;MSRP = input(MSRP1, dollar12.);&lt;BR /&gt;Invoice = input(Invoice1, dollar12.);&lt;BR /&gt;format Invoice Dollar12.;&lt;BR /&gt;format MSRP Dollar12.;&lt;BR /&gt;drop MSRP1 Invoice1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;log errors :-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasSource"&gt;data carz;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;64 set work.import&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;65 (rename= (MSRP = MSRP1,Invoice = Invoice1));&lt;/DIV&gt;&lt;DIV class="sasError"&gt;_&lt;/DIV&gt;&lt;DIV class="sasError"&gt;214&lt;/DIV&gt;&lt;DIV class="sasError"&gt;23&lt;/DIV&gt;&lt;DIV class="sasError"&gt;_______&lt;/DIV&gt;&lt;DIV class="sasError"&gt;79&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&lt;FONT color="#FF0000"&gt;ERROR 214-322: Variable name , is not valid.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&lt;FONT color="#FF0000"&gt;ERROR 23-7: Invalid value for the RENAME option.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&lt;FONT color="#FF0000"&gt;ERROR 79-322: Expecting a =.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;66 MSRP = input(MSRP1, dollar12.);&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;67 Invoice = input(Invoice1, dollar12.);&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;68 format Invoice Dollar12.;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;69 format MSRP Dollar12.;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;70 drop MSRP1 Invoice1;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;71 run;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Sat, 26 Aug 2017 10:03:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/converting-char-to-numeric-variable/m-p/391056#M3327</guid>
      <dc:creator>jonty</dc:creator>
      <dc:date>2017-08-26T10:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: converting char to numeric variable</title>
      <link>https://communities.sas.com/t5/SAS-Studio/converting-char-to-numeric-variable/m-p/391058#M3328</link>
      <description>&lt;P&gt;I believe there is a correction required in the rename option, no comma is required to rename two or more variables. Please try the updated code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data carz;
set work.import(rename= (MSRP = MSRP1 Invoice = Invoice1));
MSRP = input(MSRP1, dollar12.);
Invoice = input(Invoice1, dollar12.);
format Invoice MSRP  Dollar12.;
drop MSRP1 Invoice1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 26 Aug 2017 10:31:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/converting-char-to-numeric-variable/m-p/391058#M3328</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-08-26T10:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: converting char to numeric variable</title>
      <link>https://communities.sas.com/t5/SAS-Studio/converting-char-to-numeric-variable/m-p/391257#M3336</link>
      <description>&lt;P&gt;If you post the log into a code box opened using the forum {i} menu icon then the text format will be as in your log. As pasted into a message window the forum removes most of the leading spaces. So the underscore of error message that should have appeared under the comma, indicating that was where SAS found an error in the syntax, is not in the correct place.&lt;/P&gt;
&lt;P&gt;Note that the text is telling you the same thing: &lt;FONT color="#ff0000"&gt;&amp;nbsp;Variable name , is not valid.&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV class="sasSource"&gt;&lt;FONT color="#ff0000"&gt;&amp;nbsp;&lt;/FONT&gt;comma is not a valid variable name.&lt;/DIV&gt;</description>
      <pubDate>Mon, 28 Aug 2017 15:34:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/converting-char-to-numeric-variable/m-p/391257#M3336</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-08-28T15:34:48Z</dc:date>
    </item>
  </channel>
</rss>

