<?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: How to remove dots from numerics in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714017#M27245</link>
    <description>&lt;P&gt;You cannot have values like&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;"086.602.38373" "838.399.200.13" in a numeric variable.&amp;nbsp; So your source variable must be a character string.&amp;nbsp; You can remove the periods from a character variable using the COMPRESS() function.&amp;nbsp; If you want to convert the string without periods into a number using the INPUT() function. Note that SAS stores all numbers as floating point so the maximum number of digits you have have is 16 (really 15).&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data gus;
  infile CPF $20. ;
cards;
086.602.38373
838.399.200.13
;

data want;
  set gus;
  CPF_number = input(compress(CPF,'.'),32.);
  format CPF_number 16.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 25 Jan 2021 19:24:49 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2021-01-25T19:24:49Z</dc:date>
    <item>
      <title>How to remove dots from numerics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714011#M27241</link>
      <description>&lt;P&gt;Hello Everybody&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;I have a problem, I have a DB for fifteen thousand lines.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;And this table has a specific column, which I call "CPF".&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Well, in this CPF I have this type of sequence of numbers like this: "086.602.38373" "838.399.200.13"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;I want to remove these points, so: "08660238373" "83839920013"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;My table name: Gus&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;If someone can write the entire code by pulling my CPF column from my Gus table.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 18:22:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714011#M27241</guid>
      <dc:creator>GUST1</dc:creator>
      <dc:date>2021-01-25T18:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove dots from numerics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714012#M27242</link>
      <description>&lt;P&gt;This is a character variable, correct?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 18:30:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714012#M27242</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-01-25T18:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove dots from numerics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714014#M27243</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GUST1_0-1611599650465.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53888iB871ADF9AB94B5D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GUST1_0-1611599650465.png" alt="GUST1_0-1611599650465.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 18:34:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714014#M27243</guid>
      <dc:creator>GUST1</dc:creator>
      <dc:date>2021-01-25T18:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove dots from numerics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714016#M27244</link>
      <description>Are you using an English language or a different language? &lt;BR /&gt;&lt;BR /&gt;A numeric variable with the BEST format applied would not show up like that.</description>
      <pubDate>Mon, 25 Jan 2021 18:48:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714016#M27244</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-01-25T18:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove dots from numerics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714017#M27245</link>
      <description>&lt;P&gt;You cannot have values like&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;"086.602.38373" "838.399.200.13" in a numeric variable.&amp;nbsp; So your source variable must be a character string.&amp;nbsp; You can remove the periods from a character variable using the COMPRESS() function.&amp;nbsp; If you want to convert the string without periods into a number using the INPUT() function. Note that SAS stores all numbers as floating point so the maximum number of digits you have have is 16 (really 15).&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data gus;
  infile CPF $20. ;
cards;
086.602.38373
838.399.200.13
;

data want;
  set gus;
  CPF_number = input(compress(CPF,'.'),32.);
  format CPF_number 16.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Jan 2021 19:24:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714017#M27245</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-01-25T19:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove dots from numerics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714076#M27251</link>
      <description>data cpf;&lt;BR /&gt;infile cpf $20. ;&lt;BR /&gt;cards;&lt;BR /&gt;838.399.200.13&lt;BR /&gt;;&lt;BR /&gt;data want;&lt;BR /&gt;set gus;&lt;BR /&gt;cpf_number = input(compress(cpf,'.'),32.);&lt;BR /&gt;format cpf_number 16.;&lt;BR /&gt;run;</description>
      <pubDate>Mon, 25 Jan 2021 21:12:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714076#M27251</guid>
      <dc:creator>GUST1</dc:creator>
      <dc:date>2021-01-25T21:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove dots from numerics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714079#M27252</link>
      <description>&lt;P&gt;Its work!!&lt;BR /&gt;&lt;BR /&gt;Thank you, so much!!&lt;/P&gt;&lt;P&gt;CVF&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; New_cvf&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GUST1_0-1611609205406.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53902iEF52DFAE05A07314/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GUST1_0-1611609205406.png" alt="GUST1_0-1611609205406.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 21:14:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714079#M27252</guid>
      <dc:creator>GUST1</dc:creator>
      <dc:date>2021-01-25T21:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove dots from numerics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714084#M27253</link>
      <description>&lt;P&gt;Even without the periods you will probably still want to keep that variable as a string.&amp;nbsp; I doubt that you are going to take the MEAN or do other arithmetic on those values.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 21:23:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714084#M27253</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-01-25T21:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove dots from numerics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714085#M27254</link>
      <description>I got you!&lt;BR /&gt;I will use to do a Inner join with another table, which I have just numbers without periods Do you think it's gonna work?</description>
      <pubDate>Mon, 25 Jan 2021 21:27:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714085#M27254</guid>
      <dc:creator>GUST1</dc:creator>
      <dc:date>2021-01-25T21:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove dots from numerics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714086#M27255</link>
      <description>&lt;P&gt;Actually,&lt;/P&gt;&lt;P&gt;I found this:&lt;/P&gt;&lt;PRE class="sasLog"&gt;ERROR 23-2: Invalid option name $20..&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 21:29:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714086#M27255</guid>
      <dc:creator>GUST1</dc:creator>
      <dc:date>2021-01-25T21:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove dots from numerics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714091#M27256</link>
      <description>&lt;P&gt;If the other table has the values stored as a number then using a number would be easier to match.&amp;nbsp; With character strings you have to worry about leading zeros (or leading spaces). But that assumes the string of digits are short enough that they resulting integer can be stored exactly into the floating point numbers that SAS uses.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 21:45:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714091#M27256</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-01-25T21:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove dots from numerics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714093#M27257</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/365812"&gt;@GUST1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Actually,&lt;/P&gt;
&lt;P&gt;I found this:&lt;/P&gt;
&lt;PRE class="sasLog"&gt;ERROR 23-2: Invalid option name $20..&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Show more of the log to see what you did.&amp;nbsp; You must have done something really creative to get SAS to think you had put the $20. into a place where it was expecting options.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 21:46:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714093#M27257</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-01-25T21:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove dots from numerics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714096#M27259</link>
      <description>&lt;DIV class="dijitReset"&gt;&lt;DIV class="dijitTitlePaneContentInner"&gt;&lt;DIV class="dojoDndContainerOver dijitTree dijitTreeHover dijitHover"&gt;&lt;DIV class="dijitTreeContainer"&gt;&lt;DIV class="dijitTreeIsRoot dijitTreeNode dijitTreeNodeLoaded dijitLoaded dijitTreeNodeHover dijitTreeNodeLoadedHover dijitLoadedHover dijitHover"&gt;&lt;DIV class="dijitTreeNodeContainer"&gt;&lt;DIV class="dijitTreeIsRoot dijitTreeNode dijitTreeNodeLoaded dijitLoaded"&gt;&lt;DIV class="dijitTreeRow"&gt;&lt;SPAN class="dijitTreeContent dijitTreeContentExpanded"&gt;&lt;SPAN class="dijitTreeLabel"&gt;Errors (1)&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="dijitTreeNodeContainer"&gt;&lt;DIV class="dijitTreeIsLast dijitTreeNode dijitTreeNodeNotLoaded dijitNotLoaded"&gt;&lt;DIV class="dijitTreeRow"&gt;&lt;SPAN class="dijitTreeContent"&gt;&lt;SPAN class="dijitTreeLabel sasError"&gt;ERROR 23-2: Invalid option name $20..&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="dijitTreeIsRoot dijitTreeNode dijitTreeNodeLoaded dijitLoaded dijitTreeNodeHover dijitTreeNodeLoadedHover dijitLoadedHover dijitHover"&gt;&lt;DIV class="dijitTreeRow"&gt;&lt;SPAN class="dijitTreeContent dijitTreeContentExpanded"&gt;&lt;SPAN class="dijitTreeLabel"&gt;Warnings (2)&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="dijitTreeNodeContainer"&gt;&lt;DIV class="dijitTreeNode dijitTreeNodeNotLoaded dijitNotLoaded"&gt;&lt;DIV class="dijitTreeRow"&gt;&lt;SPAN class="dijitTreeContent"&gt;&lt;SPAN class="dijitTreeLabel sasWarning"&gt;WARNING: The data set WORK.CPF may be incomplete. When this step was stopped there were 0 observations and 0 variables.&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="dijitTreeIsLast dijitTreeNode dijitTreeNodeNotLoaded dijitNotLoaded dijitTreeNodeHover dijitTreeNodeNotLoadedHover dijitNotLoadedHover dijitHover"&gt;&lt;DIV class="dijitTreeRow dijitTreeRowSelected dijitTreeRowHover"&gt;&lt;SPAN class="dijitTreeContent"&gt;&lt;SPAN class="dijitTreeLabel sasWarning"&gt;WARNING: Data set WORK.CPF was not replaced because this step was stopped.&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="dijitTreeRow dijitTreeRowSelected dijitTreeRowHover"&gt;&lt;DIV&gt;&lt;DIV class="sasSource"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;72&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="sasSource"&gt;73 data cpf;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;74 infile cpf $20.;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;____&lt;/DIV&gt;&lt;DIV class="sasError"&gt;23&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 23-2: Invalid option name $20..&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;75 cards;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;WARNING: The data set WORK.CPF may be incomplete. When this step was stopped there were 0 observations and 0 variables.&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;WARNING: Data set WORK.CPF was not replaced because this step was stopped&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 25 Jan 2021 21:56:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714096#M27259</guid>
      <dc:creator>GUST1</dc:creator>
      <dc:date>2021-01-25T21:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove dots from numerics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714097#M27260</link>
      <description>&lt;P&gt;INPUT not INFILE&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 22:00:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714097#M27260</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-01-25T22:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove dots from numerics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714100#M27261</link>
      <description>tkssss my dear</description>
      <pubDate>Mon, 25 Jan 2021 22:11:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-remove-dots-from-numerics/m-p/714100#M27261</guid>
      <dc:creator>GUST1</dc:creator>
      <dc:date>2021-01-25T22:11:13Z</dc:date>
    </item>
  </channel>
</rss>

