<?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: Format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Format/m-p/439988#M109836</link>
    <description>&lt;P&gt;This works:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;numvar = input(charvar, comma15.);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can't change the existing variable from character to numeric.&amp;nbsp; You have to assign the numeric value to a new variable.&lt;/P&gt;</description>
    <pubDate>Sat, 24 Feb 2018 22:02:53 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2018-02-24T22:02:53Z</dc:date>
    <item>
      <title>Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format/m-p/439963#M109828</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;In a table I have character variables of the type:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;389,546,254&lt;/P&gt;&lt;P&gt;28,254,258&lt;/P&gt;&lt;P&gt;1,252,546,533&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to make this variable character, numerically, which format to use?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Sat, 24 Feb 2018 18:09:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format/m-p/439963#M109828</guid>
      <dc:creator>WilliamB</dc:creator>
      <dc:date>2018-02-24T18:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format/m-p/439968#M109830</link>
      <description>&lt;P&gt;Do like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input CharVar $20.;
datalines;
389,546,254
28,254,258
1,252,546,533
;

data want;
   set have;
   NumVar=input(CharVar, Comma20.2);
   format CharVar comma20.2;
run;

proc print data=want;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Feb 2018 20:07:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format/m-p/439968#M109830</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-02-24T20:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format/m-p/439988#M109836</link>
      <description>&lt;P&gt;This works:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;numvar = input(charvar, comma15.);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can't change the existing variable from character to numeric.&amp;nbsp; You have to assign the numeric value to a new variable.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Feb 2018 22:02:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format/m-p/439988#M109836</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-02-24T22:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format/m-p/439999#M109839</link>
      <description>&lt;P&gt;Did you really want to convert&amp;nbsp;'389,546,254' into&amp;nbsp;3,895,462.54?&lt;BR /&gt;If not then do NOT include a decimal specification on the INFORMAT.&amp;nbsp; That is telling SAS where to place the decimal point when the input stream does not have one.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2018 02:45:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format/m-p/439999#M109839</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-02-25T02:45:53Z</dc:date>
    </item>
  </channel>
</rss>

