<?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: change format form char $28 to numeric in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/change-format-form-char-28-to-numeric/m-p/691850#M210642</link>
    <description>&lt;P&gt;can you please give an example of numeric format&lt;/P&gt;
&lt;P&gt;I know that I should write&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set have;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;format var ;&lt;/P&gt;
&lt;P&gt;informat var;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Oct 2020 14:39:27 GMT</pubDate>
    <dc:creator>sasphd</dc:creator>
    <dc:date>2020-10-15T14:39:27Z</dc:date>
    <item>
      <title>change format form char $28 to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-format-form-char-28-to-numeric/m-p/691841#M210636</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to change the format of a variable to numeric&lt;/P&gt;
&lt;P&gt;the actual format and informat is&amp;nbsp;$28.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 14:26:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-format-form-char-28-to-numeric/m-p/691841#M210636</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2020-10-15T14:26:22Z</dc:date>
    </item>
    <item>
      <title>change format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-format-form-char-28-to-numeric/m-p/691842#M210638</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to change the format of a variable to numeric&lt;/P&gt;
&lt;P&gt;the actual format and informat is&amp;nbsp;$28.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 14:28:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-format-form-char-28-to-numeric/m-p/691842#M210638</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2020-10-15T14:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: change format form char $28 to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-format-form-char-28-to-numeric/m-p/691847#M210640</link>
      <description>&lt;P&gt;To change the &lt;EM&gt;type&lt;/EM&gt; of a variable, you have to create a new one, convert the value with the INPUT function, drop the old variable, and rename the new one to the name of the old.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 14:32:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-format-form-char-28-to-numeric/m-p/691847#M210640</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-15T14:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: change format form char $28 to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-format-form-char-28-to-numeric/m-p/691850#M210642</link>
      <description>&lt;P&gt;can you please give an example of numeric format&lt;/P&gt;
&lt;P&gt;I know that I should write&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set have;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;format var ;&lt;/P&gt;
&lt;P&gt;informat var;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 14:39:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-format-form-char-28-to-numeric/m-p/691850#M210642</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2020-10-15T14:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: change format form char $28 to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-format-form-char-28-to-numeric/m-p/691857#M210645</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4327"&gt;@sasphd&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to change the format of a variable to numeric&lt;/P&gt;
&lt;P&gt;the actual format and informat is&amp;nbsp;$28.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please provide example values.&lt;/P&gt;
&lt;P&gt;If a character variable holds 28 digits it can very well run into issues with computer precision when stored as numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The largest integer values that can be stored reliably in SAS are below, first for Z/OS and second for Windows/UNIX flavors. Note that neither of these comes anywhere near 28 characters even with the commas, which are not part of the value.&lt;/P&gt;
&lt;DIV class="xis-eDocBody"&gt;
&lt;DIV id="p0ji1unv6thm0dn1gp4t01a1u0g6" class="xis-topic"&gt;
&lt;DIV id="n00dmtao82eizen1e6yziw3s31da" class="xis-subTopic"&gt;
&lt;DIV id="p1ikmedbli0rz2n1de001ryz895o" class="xis-subSubTopic"&gt;
&lt;DIV id="n0a4dqd3q8ap0on175o9bilueewt" class="xis-topicContent"&gt;
&lt;DIV id="p0jgv2h7c4lluon1i4ki0hqlznvs" class="xis-table"&gt;
&lt;TABLE class="tgroup"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD style="text-align: right;"&gt;
&lt;DIV id="n1hht28dqr0cnln17rshr44qmr5i" class="xis-paraTableFirst"&gt;72,057,594,037,927,936&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD style="text-align: right;"&gt;
&lt;DIV id="n14rv9qgabmcbwn1xl5vb617q7cb" class="xis-paraTableFirst"&gt;9,007,199,254,740,992&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you going to do arithmetic with the values? If not then they should remain character. If you will then you may have significant issues with computation and precision.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 15 Oct 2020 14:54:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-format-form-char-28-to-numeric/m-p/691857#M210645</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-10-15T14:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: change format form char $28 to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-format-form-char-28-to-numeric/m-p/691862#M210647</link>
      <description>&lt;P&gt;After 160+ posts here, it should be a breeze for you to write the code from my description.&lt;/P&gt;
&lt;P&gt;Do that, and if you run into problems, post example data in usable form, and the complete log you got from the code you tried.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 15:07:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-format-form-char-28-to-numeric/m-p/691862#M210647</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-15T15:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: change format form char $28 to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-format-form-char-28-to-numeric/m-p/691870#M210652</link>
      <description>&lt;P&gt;data IPO_list0;&lt;BR /&gt;set IPO_list0;&lt;BR /&gt;Asset_alloc_equity_net1 = input(Asset_alloc_equity_net, 8.);&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 15:22:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-format-form-char-28-to-numeric/m-p/691870#M210652</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2020-10-15T15:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: change format form char $28 to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-format-form-char-28-to-numeric/m-p/691871#M210653</link>
      <description>&lt;P&gt;And now you add a little code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data IPO_list0 (
  drop=Asset_alloc_equity_net
  rename=(Asset_alloc_equity_net1=Asset_alloc_equity_net)
);
set IPO_list0;
Asset_alloc_equity_net1 = input(Asset_alloc_equity_net, 8.);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and you have effectively changed the type of the variable.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 15:26:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-format-form-char-28-to-numeric/m-p/691871#M210653</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-15T15:26:02Z</dc:date>
    </item>
  </channel>
</rss>

